Column / Measure Context Modifier Functions for Tooltips, Especially Table and Matrix
Abstract
Adding three new functions, HOVERCONTEXT, HOVERCONTEXTNAME, and ISHOVERCONTEXT, would enable developers to create more nuanced tooltips on all visuals.
Explanation
The SELECTEDMEAURE family of functions (SELECTEDMEASURE, SELECTEDMEASURENAME, ISSELECTEDMEASURE, SELECTEDMEASUREFORMATSTRING) currently provide information on the current measure when dealing with calculation items or dynamic format strings. This concept could be carried over to tooltips, though probably not by overloading the same functions.
I propose a set of functions like HOVERCONTEXT to pass through information about the source of the displayed value in context for the hovered region. This would be a reference to a measure or sometimes a column. These functions could then be interpreted by the measures used in the tooltip to display finer-grained context per the hovered region.
Example
Consider the following table visual (headers are the fully-qualified reference, not the display name, except that the table is removed from measure references):
| 'Table'[Category] | 'Table'[SubCategory] | [SumMeasure] | [AvgMeasure] |
| A | i | 4 | 2 |
| A | ii | 6 | 3 |
If we hover over the cell containing "4", we would see the following behavior in the tooltip:
- HOVERCONTEXTNAME returns 'Table'[SumMeasure]
- HOVERCONTEXT evaluates [SumMeasure], filtered to the provided row context (per existing behavior) and returns "4"
- ISHOVERCONTEXT returns TRUE for ISHOVERCONTEXT('Table'[Category], [SumMeasure]) and FALSE for ISHOVERCONTEXT('Table'[SubCategory], [AvgMeasure])
If we hover over the cell containing "ii", we would see the following behavior in the tooltip:
- HOVERCONTEXTNAME returns 'Table'[SubCategory]
- HOVERCONTEXT evaluates SELECTEDVALUE('Table'[SubCategory]), filtered to the provided row context (per existing behavior) and returns "ii"
- ISHOVERCONTEXT returns FALSE for ISHOVERCONTEXT('Table'[Category], [SumMeasure]) and TRUE for ISHOVERCONTEXT('Table'[SubCategory], [AvgMeasure])
Extension to other visuals
This behavior is similar to what we see with the default tooltip options. In the first example above, hovering with the tooltip page set to "Auto" would display "Category: A; SumMeasure: 4". The same is true of other visuals. Here is a sampling of visuals and the field well from which HOVERCONTEXT would draw its values:
- Stacked / Clustered Bar Chart: X-axis
- Stacked / Clustered Column Chart: Y-axis
- Area / Line Chart: Y-Axis
- Waterfall: Y-axis
- Funnel: Values
- Scatter Chart: Y Axis
- Pie / Donut Chart: Values
- Treemap: Values
- Gauge: Value
If you have read to the end, I'd also like to open up a discussion as to the best way to deal with implicit measures under this system. Feel free to put any recommendations in the comments.
Recent ideas
Retain Matrix/Table Scroll Position When Returning from Drillthrough
Description: Currently, when users drill through from a Matrix or Table visual to a detailed page and then use the Back button to return, the report navigates back to the source page but resets the ...Pruthviraj151 hour agoNew MemberNew7Views0likes0CommentsRetain Matrix/Table Scroll Position When Returning from Drillthrough
Description: Currently, when users drill through from a Matrix or Table visual to a detailed page and then use the Back button to return, the report navigates back to the source page but resets the ...Pruthviraj2 hours agoNew MemberNew4Views0likes0CommentsExpose Data Agent schema, question interpretation, and generated query through MCP
I would like to request additional context and metadata capabilities for the Microsoft Fabric Data Agent MCP server. It would be very useful if the MCP server could expose more information about the...Antoine17332 hours agoRegular VisitorNew3Views0likes0CommentsReal-time progress streaming for Fabric Data Agent MCP server
I would like to request true real-time progress streaming for the Microsoft Fabric Data Agent MCP server. Currently, when calling a published Fabric Data Agent through MCP using call_tool with a pro...Antoine17332 hours agoRegular VisitorNew3Views0likes0Comments