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
helen_p
Frequent Visitor

Legend to show values in title

Dear Power BI community

 

I have a legend which I am using in a visual (See below) - I have erased the information on the X axis 

 

 

helen_p_0-1663753361028.png

 

I was wondering whether there is a nifty way I can get the legend to show the values which is within the visual  I.e. the legend title could read as "Medicine (6)

 

My assumption is that there is NOT a simple turn on a button on the formatting section of the visual and I would have to make a custom column which shows the name and value

 

Can someone confirm that there is no built in function where I can show the value of the legend in the Title?

 

Kind Regards

Helen

 

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

I'm not sure this is going to work for you. When I say that you can create a column concatenating the field name and it's value, it has to be as a calculated columns, and calculated columns will not respond to slicer selections; they are calculated when the model is loaded. In other words, the value will not change. Is that ok?

If so, please share sample non-confidential data or a link to a non-confidential PBIX file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






PaulDBrown
Community Champion
Community Champion

There is no deafault option to show a value as part of the legend. You could created a column in the table concatenating the field you are using in the legend with a value to be used in turn as the legend. However this would not be dynamic, so if you apply a slicer the value would not change. You could create a "fake" legend (a new visual) to act as the legend which would by dynamic as a workaround.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hiya

 

Thanks for replying,  I have started to go down the road of concatenating as the app I am building only has one slicer (A toggle) and it is in fact the same field used in the legend

 

My slicer and the legend is made from a DAX expression like below and am now looking to concatenate a count from a field from a different table

 

Table 1 and also only slicer :  Referral Bed selector 

 

Referral bed Selector = {
    ("Care group", NAMEOF('Emergency care referral request'[Care group]), 0),
    ("Specialty", NAMEOF('Emergency care referral request'[Referral Specialty]), 1)
}
 
Do you know how I could possibly concatenate the values from the following field into this expression

 

'Emergency care referral request'[Referral Specialty]

 

Kind Regards

Helen

 

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.