This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 27 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |