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.
Hi All,
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".
Measure =
Hi, @goyalsa
Some fields in the mesure are not shown in the screenshot.
Please share a sample file for further research.
Best Regards,
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?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @AllisonKennedy, @v-easonf-msft
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.
Kind regards,
Sahil
@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 ) )
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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.
Kind regards,
Sahil
@goyalsa What does it say when you click 'See details' please?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |