Forum Discussion
jtma508
4 years agoRegular Visitor
Previous Month from January
Not a new issue and shocking that it still hasn't been resolved. I posted this under issues already but if anyone has a workaround that actually works I would be most grateful. If you have a PBI re...
- Anonymous4 years ago
Hi jtma508 ,
It works fine on my side.
Sales Prev MO = CALCULATE(SUM('Table'[value]), PREVIOUSMONTH('calendar'[date]))My Power BI Desktop version is December 2021. Try upgrading your application and check again.
Or you could try using below formula:
Sales Prev MO = CALCULATE(SUM('Table'[value]), FILTER(ALLSELECTED('Table'),FORMAT('Table'[date],"YYYYMM") = FORMAT(EDATE(SELECTEDVALUE('calendar'[date]),-1),"YYYYMM")))Best Regards,
Jay
amitchandak
Super User
4 years agojtma508 , Please check the suggestion from AlexisOlson and also check if your calendar is complete.
1. if the dates are missing in the calendar
2. Do you have timestamp in dates in your fact for Jan. Date join should be on column without timestamp
3. calendar table si marked as date table
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4