Forum Discussion
Dynamically changing Title to Latest Month
Good afternoon,
How do I make the title of a Visual Card to update each month dynamically. The measure is always automatically updated as each month passes, but the title I am having to update manually in the Properties:
Ideas appreciated !
Regards
Hii F_Reh
You can make the title dynamic by using conditional formatting on the visual title. Create a DAX measure that returns the latest month text (for example using MAX on your date column), then go to Format >> Title >> fx, choose Field value, and select that measure. The card value will refresh automatically, and the title will update each month without manual changes.
Hi F_Reh
Create a measure for the dynamic title, assuming you have a calendar table.
For example, if you have a date table, you can use:
Dynamic Title =
"Performance for " & FORMAT(MAX('Calendar'[Date]), "MMMM YYYY")
Apply the measure to the visual title
Select the card visual β Format β Title β click the fx icon (conditional formatting).
Choose Field value and select the measure Dynamic Title.If this response was helpful in any way, Iβd gladly accept a πmuch like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop π.
Hi F_Reh
Create a measure:Dynamic Title =
"Performance for " &
FORMAT(MAX('Calendar'[Date]), "MMMM YYYY")
Apply it to the card title:Select the visual
Format β Title β fx
Field value β Dynamic Title
β Title updates automatically every month
Did it work? β Give a Kudo β’ Mark as Solution β help others too!
Regards,
Rufyda Rahma | MIE
9 Replies
- rohit1991
Super User
Hii F_Reh
You can make the title dynamic by using conditional formatting on the visual title. Create a DAX measure that returns the latest month text (for example using MAX on your date column), then go to Format >> Title >> fx, choose Field value, and select that measure. The card value will refresh automatically, and the title will update each month without manual changes.
- Hans-Georg_Puls
Super User
Hi F_Reh,
rohit1991 already mentioned how you can meet your requirements. A suitable measure could look like the following:
1) Assuming that you already have a month represented as text:
DynamicCardTitle = SELECTEDVALUE('Calendar'[MonthName]) & "'s Performance"
2) Assuming that you have a month reprensented as number:DynamicCardTitle =VAR selectedmonth = SELECTEDVALUE('Calendar'[MonthNum], BLANK())RETURNIF(ISBLANK(selectedmonth),"<month undefined>",FORMAT(DATE(2020, selectedmonth , 1), "mmmm") & "'s Performance") - cengizhanarslan
Super User
Please check the formula below:
Card Title = VAR LastDate = CALCULATE ( MAX ( Date[Date] ), ALL ( Date ) ) RETURN FORMAT ( LastDate, "mmmm" ) & "'s Performance" - Zanqueta
Super User
Hi F_Reh
Create a measure for the dynamic title, assuming you have a calendar table.
For example, if you have a date table, you can use:
Dynamic Title =
"Performance for " & FORMAT(MAX('Calendar'[Date]), "MMMM YYYY")
Apply the measure to the visual title
Select the card visual β Format β Title β click the fx icon (conditional formatting).
Choose Field value and select the measure Dynamic Title.If this response was helpful in any way, Iβd gladly accept a πmuch like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop π.
- Royel
Super User
Hi F_Reh at first lest create a dax measure to get the latest month dynamically
Dynamic Title = VAR LatestDate = MAX('YourTable'[Date]) RETURN "Data showing As of " & FORMAT(LatestDate, "MMMM YYYY")Now set it in the visual:
General -> Title -> Fx -> Fiels Value and Select your newly created measure.
Results:
If it helps give a like and mark it as a solution.
Thanks
- Rufyda
Super User
Hi F_Reh
Create a measure:Dynamic Title =
"Performance for " &
FORMAT(MAX('Calendar'[Date]), "MMMM YYYY")
Apply it to the card title:Select the visual
Format β Title β fx
Field value β Dynamic Title
β Title updates automatically every month
Did it work? β Give a Kudo β’ Mark as Solution β help others too!
Regards,
Rufyda Rahma | MIE - danextian
Super User
Hi F_Reh
It really depends on your definition of latest month. If the latest month is based on the slicer selection or there will be no incoming filters to your card visual which is very unlikely, you can try as what other users have already suggested. However, if it is based on the latest date in your fact table, try this:
VAR _latestDate = CALCULATE ( MAX ( facttable[date] ), REMOVEFILTERS ( facttable ) ) RETURN FORMAT ( _latestDate, "mmmm" ) & "'s Performance" - v-kpoloju-msft
Community Support
Hi F_Reh,
Thank you for reaching out to the Microsoft Fabric Community Forum. Also, thanks to danextian, Rufyda, Zanqueta, Zanqueta, for those inputs on this thread.Has your issue been resolved? If the response provided by the community members danextian, Rufyda, Zanqueta, Zanqueta, addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.- v-kpoloju-msft
Community Support
Hi F_Reh,
Just wanted to follow up. If the shared guidance worked for you, thatβs wonderful hopefully it also helps others looking for similar answers. If thereβs anything else you'd like to explore or clarify, donβt hesitate to reach out.Thank you.