Forum Discussion

joshcomputer1's avatar
9 years ago
Solved

Calculated Column with multiple if or or statements

I need a formula for a caclulated column.  The 'Dataset'[QuestionNum] column has Q1 through Q39 as responses. I need it to categorize these into the following categories.  Is there any easy way to do...
  • v-chuncz-msft's avatar
    9 years ago

    joshcomputer1,

     

    You may refer to the following DAX.

    Column =
    VAR num =
        VALUE ( REPLACE ( 'Dataset'[QuestionNum], 1, 1, "" ) )
    RETURN
        SWITCH (
            TRUE (),
            num <= 8, "Call Handling",
            num <= 14, "Email Handling",
            num <= 19, "Professional Skills",
            num <= 39, "Ticket Handling"
        )