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] )
tamerj1
4 years agoCommunity Champion
Anonymous
Yes exactly
Anonymous
4 years agoNot applicable
but it doesn't work, when I just put averagex
- tamerj14 years agoCommunity Champion
Can you explain further with example? Also please confirm you are creating a calculated column not a measure
- Anonymous4 years agoNot applicable
I'm creating a measure, sorry that I haven't mentioned. For sum it worked, for average not
- tamerj14 years agoCommunity Champion
Anonymous
I don't know how your visual look like but you may tryAverage Scores = AVERAGEX ( DISTINCT ( SELECTCOLUMNS ( CALCULATETABLE ( ALL ( Table ), ALLEXCEPT ( Table, Table[question] ) ), "@question", [question], "@score", [score] ) ), [@score] ) - Anonymous4 years agoNot applicable
ALL() takes a column, not a table
- tamerj14 years agoCommunity Champion
It take either. But please re- copy the code as the location of all was wrong