Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
I have a workbook with a slicer and 3 measures in it. I cannot share the real data, but it looks like this:
| KatA | KatB | Count | Value | Department |
| 1 | X | 1 | 100 | A |
| 1 | Y | 1 | 200 | A |
| 0 | X | 1 | 150 | B |
| 0 | Y | 1 | 100 | B |
| 0 | Y | -1 | -100 | B |
| 1 | Y | -1 | -50 | A |
I have a switch build in to sum Count or Value dependend on users choosing. Also I have a slicer for department.
My 3 measures:
Total:
Solved! Go to Solution.
Hi @H3nning
Why is KatB using a different switch table? Also, I would use SELECTEDVALUE instead of VALUES as the latter returns a table instead of a scalar value - no problem if there is only one selection but will return an error if not. These aside, I can't replicate your issue. Your measure should work as intended.
Hi @H3nning ,
May I know if your issue is resolved, or if you still need any additional details. Please let us know if we can help further.
Thanks.
Hi @H3nning ,
If you have the opportunity to review @danextian response, you'll see that it meets your requirements. Please review it and let us know if you need any additional assistance.
Thank you @danextian for your helpful input.
Hi @H3nning
Why is KatB using a different switch table? Also, I would use SELECTEDVALUE instead of VALUES as the latter returns a table instead of a scalar value - no problem if there is only one selection but will return an error if not. These aside, I can't replicate your issue. Your measure should work as intended.
Hi @H3nning
Use a numeric flag column or explicit boolean logic:
CALCULATE(
SUM('Table'[Value]),
'Table'[_KatB] = 1
)
For reliable slicer interaction, prefer numeric calculated columns or boolean flags over text comparisons inside measures.
Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Regards,
Rufyda Rahma | MIE
Ok, I found a workaround, but it makes no sense to me:
I created a calculated column _KatB= IF(Table[KatB] = "X",1,0).
And when I use this field in the measure instead of KatB directly it works out fine. KatA is also a calculated field to be honest. So does it have to do with the fact that it is calculated or that it is a number, that it works that way??? Can anyone explain please?
THX!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |