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
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

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 June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors