Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 54 | |
| 42 | |
| 30 | |
| 24 |