Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 42 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 107 | |
| 104 | |
| 39 | |
| 35 | |
| 25 |