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
Community Champion
4 years agoAnonymous
Please try this
Total Scores =
SUMX (
DISTINCT (
SELECTCOLUMNS (
CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[question] ) ),
"@question", [question],
"@score", [score]
)
),
[@score]
)Anonymous
4 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