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

Dynamic name of measure for MTD calculations,Pre Month MTD name,Last to last month name

Hello Guys,

 

I have calculated MTD,Last month MTD, Last to last month MTD etc but problems are here is how to assing the dynamic name of the calculations like,

for example

this is current month Aug21 so MTD should be MTD Aug'21 and if we are in next month then it should automatically MTD Sep'21 on headers.

 

Similarly I have to show the name of Last month calculations, last to last months etc.

Any suggestions please help me.

@Tanushree_Kapse 

Thanks.

 

1 ACCEPTED SOLUTION
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

Please find the below measures to display the month names:

Current date = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD('Table (3)'[Date])),"MMM-YY")
 
Last Month = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD(dateadd('Table (3)'[Date],-1,MONTH))),"MMM-YY")
 
Last to Last Month = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD(dateadd('Table (3)'[Date],-2,MONTH))),"MMM-YY")
 
I hope this helps!
 
Mark this as a solution if I answered your question. Kudos are always appreciated.
Thanks!!

View solution in original post

1 REPLY 1
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

Please find the below measures to display the month names:

Current date = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD('Table (3)'[Date])),"MMM-YY")
 
Last Month = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD(dateadd('Table (3)'[Date],-1,MONTH))),"MMM-YY")
 
Last to Last Month = FORMAT(CALCULATE(max('Table (3)'[Date]),DATESMTD(dateadd('Table (3)'[Date],-2,MONTH))),"MMM-YY")
 
I hope this helps!
 
Mark this as a solution if I answered your question. Kudos are always appreciated.
Thanks!!

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.