Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a whole page dedicated to exploring our products that have shipped late, meaning there is a page filter for [On Time Ship]="False". I also have a measure to calculate the % on time for each product. The formula is:
% On Time = CALCULATE(DISTINCTCOUNT(CVD_OTD_FTMS_IV[Reference Number]),CVD_OTD_FTMS_IV[On Time Ship]=true(),REMOVEFILTERS(CVD_OTD_FTMS_IV[On Time Ship]))/CALCULATE(DISTINCTCOUNT(CVD_OTD_FTMS_IV[Reference Number]),REMOVEFILTERS(CVD_OTD_FTMS_IV[On Time Ship]))
where [Reference Number] is the unique identifier for someone's ordered item.
This measure isn't working the way I want it to and I am not sure why. The count of late items works as expected, but the total count (or denominator in my % on time measure) doesn't show what I expect unless I remove the page filter for [On Time Ship]="False". I don't know why this would be the case since I have a RemoveFilters command in the measure formula??
For example, the product below shows this with the page filter applied:
and the same product without the page filter applied:
The real total count is 277 for this product. Why is it only 55 when the page filter is applied??
I need help rather quickly, please and thank you!!
Without the PBIX a tricky one, but here goes.
Power BI will work within the context of the row it is looking at.
To remove the context use the ALL or possibly ALLSELECTED Keyword in your calculate measures.
So any measure referring to CVD_OTD_FTMS_IV should wrap ALL(CVD_OTD_FTMS_IV) in it s CALCULATE.
Pete
You mean in place of the REMOVEFILTERS part of the formula? I am not sure where to put ALL in this formula:
CALCULATE(DISTINCTCOUNT(CVD_OTD_FTMS_IV[Reference Number]),REMOVEFILTERS(CVD_OTD_FTMS_IV[On Time Ship]))
yes in place of the REMOVEFILTERS
That didn't work, if I use ALLSELECTED the value becomes 25 just like the late count. If I use ALL then the value becomes 4M which is the total rows I have in my dataset.
Not sure where to go next without a PBIX to work with.
Sorry
Pete
I also don't know where the 55 is coming from when the page filter is on. I can't figure out which 55 lines are being included and why.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |