Forum Discussion
Order tooltip values descending
- 1 year ago
While you can use a page tooltip, creating a calculated table to materialize measures is not the right approach. Calculated tables are static and do not respond to slicers or cross-filtering, even if the measures they reference do. A better solution is to use a disconnected table that lists the measure names in a column, then reference that column in a measure to return the corresponding value based on the current row.
The Hex colums above are the to be used to create a DAX-generated conditional formatting icons. SVG Conditional formatting icons do not accept hexadecimal values starting with # so %23 is used instead
Circle Icon = VAR _Color = SELECTEDVALUE(MeasuresToBeSorted[Hex2]) VAR _SVG = "data:image/svg+xml;utf8," & "<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'>" & "<circle cx='10' cy='10' r='8' fill='" & _Color & "' />" & "</svg>" RETURN _SVGNotice that the sorting of the measures in the imabe below changes.
Please see the attached pbix.
Hi Anonymous,
Power BI do not support sorting multiple measures dynamically in descending order.
But you can achive this by below work around
TooltipTable =
UNION(
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric A", "Value", [MeasureA]),
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric B", "Value", [MeasureB]),
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric C", "Value", [MeasureC])
)
Then sort TooltipTable by Value descending.
Add a tooltip page, create a table and add the values to it.
Show it as a tooltip on your visual.
π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUser and Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!
- danextian1 year agoSuper User
You're sugesting OP to use a calculated table which won't be cross-filtered by by the dimensions in the line chart? That will return in accurate numbers for a specific data point.
- Anonymous1 year agoNot applicable
I just created tooltip page before you advised, what is the impact creating below measure you suggested?
TooltipTable =
UNION(
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric A", "Value", [MeasureA]),
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric B", "Value", [MeasureB]),
SELECTCOLUMNS(VALUES('YourTable'), "Measure", "Metric C", "Value", [MeasureC])
)- grazitti_sapna1 year agoSuper User
Hi Anonymous,
You can skip it.
Mark it as a solution if your issue has been fixed.
- danextian1 year agoSuper User
While you can use a page tooltip, creating a calculated table to materialize measures is not the right approach. Calculated tables are static and do not respond to slicers or cross-filtering, even if the measures they reference do. A better solution is to use a disconnected table that lists the measure names in a column, then reference that column in a measure to return the corresponding value based on the current row.
The Hex colums above are the to be used to create a DAX-generated conditional formatting icons. SVG Conditional formatting icons do not accept hexadecimal values starting with # so %23 is used instead
Circle Icon = VAR _Color = SELECTEDVALUE(MeasuresToBeSorted[Hex2]) VAR _SVG = "data:image/svg+xml;utf8," & "<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'>" & "<circle cx='10' cy='10' r='8' fill='" & _Color & "' />" & "</svg>" RETURN _SVGNotice that the sorting of the measures in the imabe below changes.
Please see the attached pbix.