Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi!
I need some help.
I use the SWITCH function but with the same number, i don't have the same result and i don't known why.
Solved! Go to Solution.
Thanks, I found why it doesn't work.
It's because M was a measure and the M Score was a colomn. When i changed M Score in colomn. It's worked perfectly.
@Anonymous ,Both seems fine, If you are using a measure this should work fine as measure and if you using a column (M) this work fine as new column
SWITCH(
TRUE(),
[M] <= 100 , "1",
[M] <=500, "2",
[M] <=1000, "3",
[M] <=1500, "4",
[M] > 1500,"5"
)
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thanks, I found why it doesn't work.
It's because M was a measure and the M Score was a colomn. When i changed M Score in colomn. It's worked perfectly.
i can't share the data but i can show you some result.
| id | M | Score |
| 1 | 1175,02 | 3 |
| 2 | 1174,4 | 4 |
| 3 | 1159,96 | 3 |
| 4 | 1159,9 | 4 |
| 5 | 39,6 | 1 |
| 6 | 257,3 | 2 |
| 7 | 520,1 | 2 |
| 8 | 178,95 | 1 |
For calculate M , i use this :
But the switch function doesn't work correctly.
the column M is General Number
the column CA Marchandise TTC is devise
and the column Score is Standard
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 33 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 45 | |
| 30 | |
| 28 |