Forum Discussion

Darko_Giac's avatar
Darko_Giac
Helper II
7 years ago
Solved

Creating a Grouping Within IDs with DAX

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.   Th...
  • Zubair_Muhammad's avatar
    7 years ago

    Darko_Giac

     

    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"
    )