Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
reendzz98
Helper I
Helper I

Display previous month

Hi there. I need help to display previous month based on the data that I have. Below is the months that I have:

reendzz98_0-1667579920332.png

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.

 

2 REPLIES 2
reendzz98
Helper I
Helper I

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.

reendzz98_0-1667790794726.png

I want to be able to display the previous month which will allow it to display 'August' in the scorecard. Is that possible?

 

v-yalanwu-msft
Community Support
Community Support

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:

vyalanwumsft_0-1667789726230.png

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:

vyalanwumsft_1-1667789972152.png


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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.