Forum Discussion
andytmcc
3 years agoHelper I
Add a Filter to a Switch
I have created a column that assigns a value (0, 0.5 or 1) based on the difference between 2 other columns: locusofcontrol = SWITCH( TRUE(), 'Loneliness All Data'[Locus Of Control Mean] > ...
- Anonymous3 years ago
Hi,
Try like this
test_switch = switch(True(),and('Table'[Product]=1,'Table'[Serial Number]=99),1,and('Table'[Product]=1,'Table'[Serial Number]<>99),2,0)
Greg_Deckler
3 years agoCommunity Champion
andytmcc Maybe:
locusofcontrol = SWITCH(
TRUE(),
MAX('Loneliness All Data'[PC]) = "Variable" && 'Loneliness All Data'[Locus Of Control Mean] > 'Loneliness All Data'[Locusofcontrol Previous Year],1,
MAX('Loneliness All Data'[PC]) = "Variable" && 'Loneliness All Data'[Locus Of Control Mean] = 'Loneliness All Data'[Locusofcontrol Previous Year],0.5,
0)