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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
vojtechsima
Resident Rockstar
Resident Rockstar

Title Based on Name Of Used Measure

Hello, 
I have a strange request, but I believe it's very interesting.

I want to dynamically change the title of a visual depending on which measure that visual is using.

For Example this visual use this measure:

vojtechsima_0-1661183375455.png

The visual title would be like this:

vojtechsima_1-1661183412979.png


I played with some DAX functions but can't figure it out.

Thank you 

 
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@vojtechsima only solution would be if you have a predefined measure and then you select in the slicer what you want to show and that can be used to create the title as well. In this case, the calculation group will make it super easy but again it will only work if the list of measures is predefined and user can select using the slicer.

 

I will stay away from the SWITCH function although it will do the job, one core reason is that if the measure has a different format, you cannot do that using SWITCH  and this can easily achieve with calculation groups. I have tons of videos on various calculation group use cases, if interested, check out these videos here https://youtube.com/playlist?list=PLiYSIjh4cEx2s8-jXBhv5aCu5_6F9zQ3I

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @vojtechsima ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

 

parry2k
Super User
Super User

@vojtechsima only solution would be if you have a predefined measure and then you select in the slicer what you want to show and that can be used to create the title as well. In this case, the calculation group will make it super easy but again it will only work if the list of measures is predefined and user can select using the slicer.

 

I will stay away from the SWITCH function although it will do the job, one core reason is that if the measure has a different format, you cannot do that using SWITCH  and this can easily achieve with calculation groups. I have tons of videos on various calculation group use cases, if interested, check out these videos here https://youtube.com/playlist?list=PLiYSIjh4cEx2s8-jXBhv5aCu5_6F9zQ3I

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AntonioM
Solution Sage
Solution Sage

If it's a set few measures you want to swap between, you could create a column with the titles and use a SWITCH to select each one.

 

AntonioM_0-1661242655208.pngAntonioM_1-1661242705314.pngAntonioM_2-1661242725000.png

 

Then set the title to First Measures, or you could make a title measure = SELECTEDVALUE(Measures[Measure])

AntonioM_3-1661242842764.pngAntonioM_4-1661242872041.png

 

 

This might also be something that Calculation groups can do better. You have functions such as SELECTEDMEASURE and

SELECTEDMEASURENAME which might be able to get the name of the current measure (they're not something I've ever used).

 

Hi, @AntonioM 
Thank you, yeah exactly, that was might first thought but I wanted to go all the way into dynamic execution.
The calculation groups might do the trick, thanks for the suggestions, haven'T yet played with it but seems like good opportunity.

If nobody will post that solution I will post it here when I will get to it.

Thank you for suggestions, @AntonioM 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.