Forum Discussion
Anonymous
5 years agoNot applicable
How to Calculate Inventory Days Using DAX
Hi, I am new to using Power BI and DAX functions. Appreciate if anyone could help me with this. I want to calculate the Inventory Day of a list of materials (also categorise by MRP) based on ...
amitchandak
5 years agoSuper User
Anonymous , I am not able to get you formula completely. So I am giving measures you may need to get that with help from date table and time intelligence
example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-2,MONTH))
Days of last three month = day(eomonth(today(),0)) + day(eomonth(today(),-1)) + day(eomonth(today(),-2))