Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Dear gurus,
am having an issue with measure providing correct result at aggregated level but missing to display values at detailed level.
My database is simple:
SKU | Classification | Quantity | Year | Month |
ABC | Current Forecast | 99 | 2023 | 4 |
ABC | Current Forecast | 100 | 2023 | 5 |
DEF | Current Forecast | 120 | 2023 | 6 |
ABC | Forecast M-1 | 80 | 2023 | 4 |
ABD | Forecast M-1 | 80 | 2023 | 5 |
DEF | Forecast M-1 | 90 | 2023 | 6 |
ABC | Forecast M-2 | 50 | 2023 | 4 |
ABD | Forecast M-2 | 100 | 2023 | 5 |
DEF | Forecast M-2 | 100 | 2023 | 6 |
I need to compare the total Current Forecast for a user-defined period (I use a slicer on Year and Month) and a user-defined period (I use a slice on Classification)
I created following measures:
calculate total current forecast =
Let me know if you might need further assistance.
Additionally, you could try using a DAX query in a tool like DAX Studio to debug your measures and see exactly what data is being used in the calculations.
You may also want to try using a different visual, such as a table or matrix, to see if the missing values are still present.
Another possibility is that there may be some data quality issues in your dataset, such as missing or incomplete data. You could try checking your data for any inconsistencies or gaps that may be causing the missing values.
These modifications should ensure that the measures are correctly filtered at the SKU level for the selected period.
Hello @moia79,
It's possible that some SKUs are missing the Fcst CM value because they don't have any entries with that classification in the selected period.
To display all values at the SKU level, you may need to modify your measures to explicitly filter for the selected period at the SKU level, rather than relying on the ALL() function to remove the Classification filter.
Similarly, your forecast for comparison measure could be modified as follows:
Calculate forecast for comparison =
Calculate(
SUM ('Demand Database'[Quantity]),
FILTER('Demand Database',
'Demand Database'[Classification]=SELECTEDVALUE('Demand Database'[Classification]) &&
'Demand Database'[Year]=SELECTEDVALUE('Demand Database'[Year]) &&
'Demand Database'[Month]=SELECTEDVALUE('Demand Database'[Month])
)
calculate total current forecast =
Calculate(
SUM ('Demand Database'[Quantity]),
FILTER('Demand Database',
'Demand Database'[Classification]="FCST Curr Month" &&
'Demand Database'[Year]=SELECTEDVALUE('Demand Database'[Year]) &&
'Demand Database'[Month]=SELECTEDVALUE('Demand Database'[Month])
)
hello @Sahir_Maharaj and thanks for your suggestions.
I tried with your formula with FILTERS, it doesn't work at all. The slicer on the comparison measure is blocking the measure to take the values of current month, so the query is totally empty.
I still believe that something like ALL function should be used to remove the slicer effect.
moreover, by using ALL function, at least I can extract some values at SKU level but again I have missing values if I select more than one month for the extraction of values - but the total is always correct so am wondering if there's any conflict between the slicer and the visual.
if you've any other suggestion I'm happy to tried it out.
M
For example, your total current forecast measure could be modified as follows:
One way to do this is to use the FILTER() function to create a new table that includes only the selected period, and then use that table as a filter in your measure.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |