Forum Discussion
Anonymous
4 years agoNot applicable
Grouping column
Hi! I need to create a formula, when I will use an existing table but with grouping, how can I do it?
- 4 years ago
Anonymous
Please try this
Total Scores = SUMX ( DISTINCT ( SELECTCOLUMNS ( CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[question] ) ), "@question", [question], "@score", [score] ) ), [@score] )
Anonymous
4 years agoNot applicable
Yes, I don't need to sum 3 times 0.21, it will be 0.63, but I need only 0.21. This score is question score, not persons, but it is shown per person, that's the problem
tamerj1
Community Champion
4 years agoAnonymous
Please try this
Total Scores =
SUMX (
DISTINCT (
SELECTCOLUMNS (
CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[question] ) ),
"@question", [question],
"@score", [score]
)
),
[@score]
)- Anonymous4 years agoNot applicable
It works for now, I need to do it couple times for some cases, but thanks a lot!!!
- Anonymous4 years agoNot applicable
It's very good solution, but, what if instead of sum, I need average, when I just put averagex, it works wrongly
- tamerj14 years ago
Community Champion
Anonymous
Yes exactly
- Anonymous4 years agoNot applicable
but it doesn't work, when I just put averagex