cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to make dynamic titles of month.

I am working on 3 matrix to show data of this month, next month, and the month after next month. These matrix will update automatically every month. For example, now is Jun, so these matrix show data of Jun, Jul and Aug, respectively. Next month, these will change to Jul, Aug and Sep automatically.

 

I've 2 questions:

 

1) When I use DAX like this for the first matrix (this month): 

Title1 = "Forcast this month, " & FORMAT(MONTH(TODAY()),"mmmm"
 
It always shows January, but not June. I'm wondering why?? How to fix this?
Jan.PNG
 
 
2) How to make dynamic titles for my second and third matrix, to show next month and the month after next month, which can automatically update every month. I mean, now, they can show Jul and Aug. When it's July, it will show Aug and Sep. Please be careful about Month11&12&1 and 12&1&2 issues.
 
Many thanks! Will accept answer really quickly!
1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

It seems that you want to create the dynamic titles of month for matrix.

By my tests, you could try the measures below.

Spoiler
this month = "forcast start this month,"&FORMAT(TODAY(),"MMMM")
next month =
VAR next_month =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 1, 1 )
RETURN
    FORMAT ( next_month, "MMMM" )
month after next month =
VAR month_after_next_month =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 2, 1 )
RETURN
    FORMAT ( month_after_next_month, "MMMM" )

Here is the output.

Capture.PNG

Hope this can help you.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

It seems that you want to create the dynamic titles of month for matrix.

By my tests, you could try the measures below.

Spoiler
this month = "forcast start this month,"&FORMAT(TODAY(),"MMMM")
next month =
VAR next_month =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 1, 1 )
RETURN
    FORMAT ( next_month, "MMMM" )
month after next month =
VAR month_after_next_month =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + 2, 1 )
RETURN
    FORMAT ( month_after_next_month, "MMMM" )

Here is the output.

Capture.PNG

Hope this can help you.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thanks Cherry, this works perfect

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors