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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Create a Visual that Displays Prior Month Name

I would like to display the previous month in some sort of visual so I can create appropriate YTD - "Month" titles on my dashboards.  My data is refreshed every month, so the prior month would work best in this situation.  

 

I started using this simple formulain a measure, but it returns a number and not a month name.

Previous Month = month(today())-1
 
Anybody have a good solution to show month name? Thanks!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try like

Previous Month = format(date(year(today()), month(today())-1,1),"MMM-YYYY")

 

You can change format as per need

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
MDrabik
Advocate I
Advocate I

Here's something that's worked for me in the past, and it accounts for the January back to December issue I have when subtracting 1 from the month number:

 

Previous Month = FORMAT ( EOMONTH( TODAY (), -1 ), "MMM-YYYY" )
 
You can easily change the format of the output as needed.
 
Thanks!
 
Matt Drabik
amitchandak
Super User
Super User

Try like

Previous Month = format(date(year(today()), month(today())-1,1),"MMM-YYYY")

 

You can change format as per need

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.