I could not find out the error behind this calculation.
I want to take the last week's Gross Inventory as a supply for next week and run the calculation but it is giving me an error for a week "202142".
Some fields in the mesure are not shown in the screenshot.
Please share a sample file for further research.
Community Support Team _ Eason
@goyalsa What is the 'error' that you're getting? Or what values do you expect?
What is the DAX for Total Supply and Gross demand measures referenced in your Gross Inventory?
What does your model view look like with relationships between the tables?
The Gross inventory number is not showing correctly,
I am trying to take last week's Gross Inventory and then adding the next week's Supply and subtracting the next week's demand.
The formula should be run like this but it is not working for now.
Gross Inventory(202144) = Gross Inventory (202143) + Total Supply (202144) - Total demand (202144)
Total Supply Measure:
Hope this will helps.
@goyalsa It's very difficult to reference the same measure within itself in DAX, but you could do the total supply up to current week - total supply up to next week.
In your Gross Inventory you're applying the same dates to both supply and demand. You need to filter them separately:
_Gross Inventory =
CALCULATE ( [_Total Supply measure],
FILTER(ALLSELECTED(Dates), Dates[Loadingweek] <= MAX(Dates[Loadingweek]) ) )
-CALCULATE ( [_Gross demand], FILTER(ALLSELECTED(Dates), Dates[Loadingweek] <= MAX(Dates[Loadingweek]) +1 ) )
Hi @AllisonKennedy ,
It is giving a visual error.
I created a date table and link the Supply & demand table with the loading week in the date table.
Click here to read more about the December 2021 Updates!
Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.
Mark your calendars and join us for our next Power BI Dev Camp!