March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |