Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I'm working with a fairly large survey data set and am just struggling slightly with finding a way to categorize respondents into certain groups depending on their response choice.
The response options include ADHD, OCD, VisualImpairment, MotorImpairment, Dysgraphia, and Dyslexia.
The respondents might have duplicate rows, so I would like to categorize any respondent who chose either ADHD or OCD into Group 1, and respondents who chose anything else into Group 2 (using DAX)
I know I need to use the Filter function, but not quite sure how to nest it.
I've attached a workbook which will hopefully provide further clarity.
Any help/advice is greatly appreciated!
Currently using Office 365 ProPlus
Darko
Solved! Go to Solution.
You can use a column like
Column = IF ( CALCULATE ( DISTINCTCOUNT ( Table1[DxGrouping] ), ALLEXCEPT ( Table1, Table1[ID] ), Table1[DxGrouping] IN { "ADHD", "OCD" } ), "Group 1 & 2", "Group 2" )
Hi,
I am assuking that Column1 shows your expected result. What does Group 1 & Group 2 mean? Why is Student 1 falling under Group 1 & Group 2?
You can use a column like
Column = IF ( CALCULATE ( DISTINCTCOUNT ( Table1[DxGrouping] ), ALLEXCEPT ( Table1, Table1[ID] ), Table1[DxGrouping] IN { "ADHD", "OCD" } ), "Group 1 & 2", "Group 2" )
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |