The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |