Forum Discussion
JamesBurke
Helper III
1 year agoMeasure 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...
- 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]
)
Kedar_Pande
Super User
1 year agoCC 2 =
SWITCH(
TRUE(),
[CC 1] = -1, 0,
[CC 1] = 0, [Total Solar],
[CC 1] = 1, [Total Cons],
[CC 1] = 2, [BSP 1] - [Nursery],
[CC 1] = 3, [Art Design] - [MFL & Humanities and Thornton],
[CC 1] = 4, [Main School] - [Art & Design],
BLANK()
)
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn