Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |