Forum Discussion
Newbie123
9 years agoNew Member
Groupby on calculated column
I have two tables: one table has columns that show: a QuestionID (unique to the question) an AnswerID (unique to the respondent) and a ChosenAnswerSequence# (that reflects the actual answer the p...
v-sihou-msft
Microsoft Employee
9 years ago
In this scenario, each respondent may have multiple selection on a question, to have them appear on same row along with question, you need to use CONCATENATEX() function to concatenate all answers into single string.
Measure =
CALCULATE (
CONCATENATEX ( Table, Table[Text_BasedAnswer], "," ),
ALLEXCEPT ( Table, Table[AnswerID] )
)
Regards,
Newbie123
9 years agoNew Member
Thanks for the reply, but I get an error saying that the syntax is incorrect. This is what I have written:
Measure = CALCULATE (CONCATENATEX (DFMAnswer_MultipleCheckbox, DFMAnswer_MultipleCheckbox[CheckboxTextAnswer] ","), ALLEXCEPT (DFMAnswer_MultipleCheckbox, DFMAnswer_MultipleCheckbox[AnswerId]))
- v-sihou-msft8 years ago
Microsoft Employee