Forum Discussion
gsandip
3 years agoFrequent Visitor
PREVIOUSMONTH() function does not working for me
Hi, I have written PREVIOUSMONTH() in below measure: Previous Month Sales = VAR vSales = CALCULATE( sum(Orders[Sales]), PREVIOUSMONTH('Calendar'[Date]) ) RETURN IF(vSales = blank(), 0, vSale...
- 3 years ago
Hi,
I got the solution here By amitchandak
(1) Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, YOY - YouTube
I have used below DAX and it works fine for me.
Previous Month Sales = CALCULATE ( SUM ( Orders [Sales] ), OFFSET (- 1 , ALLSELECTED ( 'Orders' [Month Name] , Orders [Month Num] ), ORDERBY ( 'Orders' [Month Num] , ASC ), KEEP ) )
Great Help
Thank you,
Sandip Ghosh
Ahmedx
Super User
3 years agoin that case you need new features OFFSET