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.
Anonymous
Not applicable

Thanks Cherry, this works perfect

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!