Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This should be easy, but can't wrap my mind around it
Have four users
LOAD * INLINE [
User, SCORE
1, 3
2, 4
1, 4
3, 1
4, 1
5, 1
];
Would like how many users have a 1 for the score etc.. so would be like
NumUsers Score
3 1
1 4
1 7
gotcha, so the dimension becomes a 'calculated dimension' with the following formula:
=aggr(sum(SCORE),User)
I loaded the data but got a different result.
Score is the dimension and count(distinct user) is the expression. I validated the results with the list of users that fall into each category .
What am i doing wrong ?
user 1 has two scores, a value of 3 and a value of 4 so the score would be 7. Sorry didn't explain that very well in the initial question.
So, want the count of how many users have a score of X, and the 'score' is the sum of the scores.
gotcha, so the dimension becomes a 'calculated dimension' with the following formula:
=aggr(sum(SCORE),User)
Yes! Gah it looks like case sensitivity was hurting me
I had =aggr(sum(SCORE),user)
with a lowercase u for user!