Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am trying to calculate inventory days (meaning how long time will the item theoretically be on stock from now on, based on history) with this measure:
Inventory QTY is a measure in itself:
Item | Inventory valuation | Outflow Value 3M | Inventory QTY | Inventory days |
A | 100 | 150 | 3 | 60 |
B | 200 | 150 | 4 | 120 |
C | 150 | 0 | 0 | |
Total | 300 | 450 | 7 | 60 |
But the issue there is, that for Item "C" the outflow value of 150 does not have any influence really on the row for item "C", but on the total the 150 is included, for calculation purpose this would be the right result regarding inventory days:
Item | Inventory valuation | Outflow Value 3M | Inventory QTY | Inventory days |
A | 100 | 150 | 3 | 60 |
B | 200 | 150 | 4 | 120 |
Total | 300 | 300 | 7 | 90 |
Hi @Morten_DK ,
Can you put some sample data here with expected result and current result?
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
I have updated the original post with some sample data, hope that helps 🙂
@Morten_DK ,
Here's your solution DAX:
Inventory Days2 =
DIVIDE(
CALCULATE(
SUM('Table (3)'[Inventory valuation]),
'Table (3)'[Inventory valuation] <> BLANK()
)*90,
CALCULATE(
SUM('Table (3)'[Outflow Value 3M]),
'Table (3)'[Inventory valuation] <> BLANK()
)
)
Please make other changes accordingly because I have created the DAX according to the data your provided.
Result:
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
Thanks for the feedback. I can't get the proposed solution working, as "Inventory valuation" is also a measure