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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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 Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors