Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there. I need help to display previous month based on the data that I have. Below is the months that I have:
I get to display current month using measure max(Month). I tried to find measures through website but the one that I could find either to display sales on the current month or to display previous month based on real-time date.
I want a measure that allows the powerBi to display 'August' and automatically displays 'September' when 'October' data comes in.
Hi @v-yalanwu-msft , thank you for your respond. I understand from your solution that it will display the value based on previous month, which is very helpful. I actually want to display the previous month only for example, the one that I have now allows to display the current month based on that I have in my table which is September.
I want to be able to display the previous month which will allow it to display 'August' in the scorecard. Is that possible?
Hi, @reendzz98 ;
First you can create a date column for the month, if you have one, you don't need to create another one, if not, create a new date column for the month: similar to the following:
Then could try to create a measure to calculate the previous month's value:
Previous = CALCULATE(SUM('Table'[value]),PREVIOUSMONTH('Table'[Date]),ALL('Table'))
Or
Previous2 = CALCULATE(SUM('Table'[value]),DATEADD('Table'[Date],-1,MONTH),ALL('Table'))
Or
Previous3 = CALCULATE(SUM('Table'[value]),FILTER(ALLSELECTED('Table'),EOMONTH([Date],0)=EOMONTH(MAX('Table'[Date]),-1)))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |