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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to display last month along with year ?

I wanted to display the last month with year in a card visual.

Suppose now it's Dec 2022, then it should display Nov 2022. If it's Jan 2023, it should display Dec 2022.

The format should be either "MMM YYYY" or full month name year. 

1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
Resident Rockstar

 

Hi @Anonymous 

 

Last Month = FORMAT(EOMONTH(TODAY(),-1), "MMMM /YYYY")

Mikelytics_0-1671456230768.png

 

If you work with a data table and you want to filter you can also do something like:

 

Last Month = FORMAT(MAX(DimDate[Date]),-1), "MMMM /YYYY")

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

hi @Anonymous 

try to plot with a column like this:

MMMYYYY = FORMAT(EDATE(TODAY(), -1), "MMM YYYYY")

Mikelytics
Resident Rockstar
Resident Rockstar

 

Hi @Anonymous 

 

Last Month = FORMAT(EOMONTH(TODAY(),-1), "MMMM /YYYY")

Mikelytics_0-1671456230768.png

 

If you work with a data table and you want to filter you can also do something like:

 

Last Month = FORMAT(MAX(DimDate[Date]),-1), "MMMM /YYYY")

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Uspace87
Resolver III
Resolver III

@Anonymous 

 

 

Last Month = FORMAT(TODAY() - 1, "MMMM /YYYY")

@Anonymous 

 

sorry, try this:

 

Last Month =
FORMAT(
    EOMONTH(TODAY(), -1),
    "MMMM /YYYY"
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors