Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi this is what I have so far
Solved! Go to Solution.
Hi @salman_ali
try
BalanceScore = IF(
'Math'[Shift1]='Math'[Shift2] && 'Math'[Shift2]='Math'[Shift3] && 'Math'[Shift3]='Math'[Shift4] && 'Math'[Shift4]='Math'[Shift5],
3,
1)
You can use && instead of AND().
BalanceScore = Switch( True(),
[Shift1]=[Shift2] && [Shift1]=[Shift3] && [Shift1]=[Shift4] && [Shift1]=[Shift5]) , 3,
1)
But It is not necessary to use Switch, you use switch when you want more 2 results.
BalanceScore = IF([Shift1]=[Shift2] && [Shift1]=[Shift3] && [Shift1]=[Shift4] && [Shift1]=[Shift5]), 3 ,1)
How to use Swtich: https://docs.microsoft.com/en-us/dax/switch-function-dax
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this
BalanceScore =
SWITCH(
TRUE(),
AND(
[Shift3] = [Shift4],
[Shift4] = [Shift5]
), 3,
AND(
[Shift1] = [Shift2],
[Shift3] = [Shift4]
), 1,
1
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @salman_ali
try
BalanceScore = IF(
'Math'[Shift1]='Math'[Shift2] && 'Math'[Shift2]='Math'[Shift3] && 'Math'[Shift3]='Math'[Shift4] && 'Math'[Shift4]='Math'[Shift5],
3,
1)
Thank you, it worked!
Thanks, worked!
User | Count |
---|---|
131 | |
108 | |
101 | |
67 | |
64 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |