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.
Dear experts,
I am struggling trying to use ALL in a measure in my matrix:
My column hierarchy looks like this:
The desired result is 1139 on all the cells for the second row (the total nr of cases for the selected week)
I've tried a lot of different things. The last attempt:
NrCasesForecastedThisWeekALL = CALCULATE ( [# Cases Forecast -NoSL]; ALL ( 'Date'[WeekDayNumber]; 'Date'[Week Day]; 'Date'[Date] ) )
With this I'm getting the same result as you can see above.
I have tried this as well
AllCases = CALCULATE([# Cases -NoSL] ; ALLEXCEPT('Date';'Date'[Calendar Week]))
but the result is not correct.
Thank you in advance!
Solved! Go to Solution.
Dear @AlB Thanks a lot for reaching out 🙂
The measure is a simple DISTINCTCOUNT for IDs.
I actually made it work like this:
CALCULATE([# Cases Forecast -NoSL] ; ALLEXCEPT('Date'; 'Date'[Calendar Week] ; 'Date'[Calendar Year]))
I was using a slicer for the calendar year in the page and that had to be included in the measure.
Thanks for your quick response!
Hi @setis
Can you show the code for the measure and perhaps the structure of the tables involved, including relationships? To start with, wouldn't you need an ALL on 'Date'[Calendar week] as well?
NrCasesForecastedThisWeekALL = CALCULATE ( [# Cases Forecast -NoSL]; ALL ( 'Date'[WeekDayNumber]; 'Date'[Week Day]; 'Date'[Date];'Date'[Calendar Week] ) )
Dear @AlB Thanks a lot for reaching out 🙂
The measure is a simple DISTINCTCOUNT for IDs.
I actually made it work like this:
CALCULATE([# Cases Forecast -NoSL] ; ALLEXCEPT('Date'; 'Date'[Calendar Week] ; 'Date'[Calendar Year]))
I was using a slicer for the calendar year in the page and that had to be included in the measure.
Thanks for your quick response!
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |