Forum Discussion
Anonymous
6 years agoNot applicable
using Switch to compare column values
Hi this is what I have so far BalanceScore = IF(AND([Shift1]=[Shift2],[Shift3]=[Shift4]),IF(AND([Shift3]=[Shift4],[Shift4]=[Shift5]),3,1),1) I would like to setup a Dax forumula. My table name...
- 6 years ago
Hi Anonymous
try
BalanceScore = IF( 'Math'[Shift1]='Math'[Shift2] && 'Math'[Shift2]='Math'[Shift3] && 'Math'[Shift3]='Math'[Shift4] && 'Math'[Shift4]='Math'[Shift5], 3, 1)
edhans
6 years agoCommunity Champion
Try this
BalanceScore =
SWITCH(
TRUE(),
AND(
[Shift3] = [Shift4],
[Shift4] = [Shift5]
), 3,
AND(
[Shift1] = [Shift2],
[Shift3] = [Shift4]
), 1,
1
)