Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am sharing my Pbix file here.
I am fairly new to DAX, and I tried SWITCH statement for the first time today.
Somehow, when there is any occurrence of outcome of 0, Total comes out to be 0.
So, on this case because Jane Doe has output of 0, total is 0.
But, somehow, it does not sum up as expected to 1.
I have only two examples here, but total should be 1 in this case.
I think there is something I need to fix on the DAX code, but I am not sure where/why.
This measure is called "Refused 0818" in the file.
The logic here is, when there is 1st case, output is 1, second case --> 0, third case --> 0, otherwise vRefused
Isn't it?
Thank you for any feedback.
@amitchandak I would like to follow up on my inquiries. I am anxious to know how to fix row context issue in this case. Thank you so much!
@JustinDoh1 , when you use rows context example min/max (min(A) = "A") in a measure. the calculations are done at row level. And unless we use allselected and all, we are still on the same visual row.
In such a case, the grand total is recalculated. It misses the context as it does not have a name. That we why we take the help of summarize or values to group data from rows level to grand total level
As, summarize do not work same as the visual table always, we need to work on our formula
is this different from
Thank you for your feedback.
I was using SWITCH, but my output is still very unstable. How do I go about wrapping up my calculate to be obvious and stable?
How do I go about "summarize or values to group data from rows level to grand total level"?
Do I go that in the Calculate function at VAR section or inside Switch area?
Thanks.
I have updated file here.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |