Jump to content

Crosstab groups, multiple columns - MongoDB question


landon.isaacs985

Recommended Posts

I am trying to make a cross tab that looks similar to this:

 

 sample 1sample 2
UserPoints PossiblePoints AchievedUnansweredPercent ScorePoints PossiblePoints AchievedUnansweredPercent Score

My data is coming out of MongoDB and the points possible, points achieved, unanswered and percent score are being returned within a sub-document like this:

   "sample" : "1",
                    "score" : {
                       "pointsPossible" : NumberLong(68),
                        "pointsAchieved" : 39.0,
                        "unanswered" : NumberLong(0),
                        "pctScore" : 0.5672
                   }

How do I treat pointsPossible, pointsAchieved, unanswered and pct score as dynamic columns to add under each assessment in my cross-tab?

Is this possible, or does the document structure in Mongo need to be changed to make this work?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...