Forum Discussion

JamesBurke's avatar
JamesBurke
Icon for Helper III rankHelper III
1 year ago
Solved

Measure that References other Measure based on a conditional Column

Hi All ,    I'm looking at making this type of logic into a measure but not sure how to :   CC 2 = If CC 1 = -1 then = 0 If CC 1 = 0 then use "Total Solar" If CC 1 = 1 then use "Total Cons" I...
  • SamWiseOwl's avatar
    1 year ago

    So CC1 is a calculated column that will appear in the visual and the other items listed are all existing measures?
    CC2 =
    Switch(
    SelectedValue(table[CC1])
    ,-1, 0

    ,0, [Total Solar]

    ,1, [Total Cons]

    ,2, [BP 1] - [Nursery]

    ,3, [Art Design] - [MFL & Humanities and Thornton]

    ,4,[Main School] - [Art & Design]

    )