I have a Power BI Report that is using the small multiples to display the Top 30 Customers.
The Line chart will show me Total Sales, Total Profit or Total Quantity depending on the following DAX formula:
Metric Selected = SELECTEDVALUE( ‘Metric Selection’[Metric] ) - these values are coming from a table I created for Sales, Profit, Quantity and reference in the following DAX formula:
Everything displays correctly in the Line Chart when I use a Slicer to see either Sales, Profit or Quantity.
My question is, is there a way to get the value in the Line Chart to Show Either Sales, Profit or Quantity in the Tooltip that pops up when I hover over it. Right now, it shows the name of the Measure “Value Selected” as it should - but is it possible to have that name be something else that can vary (Sales, Profit, Quantity)…
Could you provide a test .pbix file? That will likely get more responses as forum members won’t be required to mock one up themselves when testing solutions for you.
Thanx for the Measure but it doesn’t solve the issue. This measure effectively does the same as my measure in what it will display:
Dynamic Tooltip Text Total Sales => both of these entries being simple text
What I’m looking for is, when I select from my Slicer either Sales, Profit or Quantity referencing my Metric Selected table, to see not the name of the measure but the following:
Total Sales $1,000,000 => and the same for the other 2 selections.
I’m beginning to believe that this is not possible as the underlying DAX code will only select the name of the Measure.
It’s not a big deal in the long run, I was just thinking that to display the actual name and value would look better. My work around will be the rename the Measure to Value and go with it.
I took a page from Sam and asked ChatGPT for some help with this.
This is what it recommended:
In Power BI, you cannot directly change the measure’s name dynamically based on the selected slicer value because measure names are static within your data model. Measures are typically given static names when defined in DAX.
However, you can create a workaround to achieve a similar effect by adding a card visual or a text box to your report page. In this card or text box, you can display the selected metric name from your slicer, and next to it, you can display the dynamic value using the “Dynamic Tooltip” measure we created earlier. Here’s how you can do it:
Add a card visual or a text box to your report page.
In the Values field well of the card visual or text box, add the measure that captures the selected metric from your slicer. Let’s call this measure “Selected Metric.”
Create a DAX measure to capture the dynamic tooltip value as previously shown:
Next to the card visual or text box displaying the selected metric, add another text box that references the “Dynamic Tooltip” measure:
mathematicaCopy code
[Dynamic Tooltip]
Now, when you change the metric selection in your slicer, the card visual or text box will update to display the selected metric, and the adjacent text box will display the dynamic tooltip value accordingly.
This approach allows you to provide a dynamic tooltip-like experience, where the metric name in the card or text box changes based on the slicer selection, and the adjacent text box displays the corresponding dynamic value. While it’s not the measure name itself that changes, it achieves a similar result in your report.
The Measure is almost identical to yours - so thanx for that.
What I have now is a popup card that shows what I need.