Forum Discussion
ageraci
7 years agoFrequent Visitor
Dynamic Inventory Age Tracker
I have been banging my head against this problem for the last week and could really use some assistance. What I am trying to do: Calculate the age of inventory that is waiting to be repaired or ...
v-lili6-msft
7 years agoCommunity Support
hi, ageraci
After my test, If you could use this way as below:
Step1:
Add a calendar table
Step2:
Use crossjoin Function to add a new table like below
Table = FILTER(CROSSJOIN(Table1,'calendar'),'calendar'[Date]>=Table1[EstDate]&&'calendar'[Date]<=Table1[RepairDate])
Step3:
Then add these two measure
Measure = IF( DATEDIFF(MAX('Table'[EstDate]),MAX('Table'[Date]),DAY)=0,FALSE(),DATEDIFF(MAX('Table'[EstDate]),MAX('Table'[Date]),DAY))
Measure 2 = CALCULATE(SUMX('Table',[Measure]))Step4:
Create the relation between new table with calendar table
Result:
here is my pbix, please try it.
https://www.dropbox.com/s/bvtbtc9nbh94r75/Dynamic%20Inventory%20Age%20Tracker.pbix?dl=0
hope this will help you.
Best Regards,
Lin