Forum Discussion

Matt0515's avatar
Matt0515
Frequent Visitor
6 years ago
Solved

Creating a List of Records Based on a Measure

Hello all, and thanks in advance for any feedback on the following question.   I have a rather complex measure that I would like to not simply count the rows that qualify, but rather have the abili...
  • v-eachen-msft's avatar
    v-eachen-msft
    6 years ago

    Hi Matt0515 ,

     

    According to your example, you could try SWITCH() function.

    SWITCH (
        TRUE (),
        AND (
            OR ( 'Table'[Column X] = "a", 'Table'[Column X] = "b" ),
            'Table'[Column Y] = "xyz"
        ), "Business Unit 1",
        AND (
            OR ( 'Table'[Column X] = "c", 'Table'[Column X] = "d" ),
            'Table'[Column Y] = "abc"
        ), "Business Unit 2"
    )