Forum Discussion
Populate a Tooltip from a Data Dictionary
- 8 months ago
Hi Erosenthal,
For doing standardized tooltips from a data dictionary there is about 3 or 4 approaches you can try
First Approach:
you can use Field Parameters and Data Dictionary Table to achieve this:
- Create your Data Dictionary table in Power Query:
// Just An Example let Source = Table.FromRows({ {"Days in Warehouse", "Number of calendar days an item has been in warehouse storage", "Operations"}, {"Inventory Turnover", "Cost of goods sold divided by average inventory", "Finance"}, {"Order Fill Rate", "Percentage of orders completely filled from stock", "Operations"} }, type table [Metric=text, Definition=text, Category=text]) in SourceThen create relationships between your fact tables and the data dictionary
- Also use the Definition field directly in tooltips by adding it to the Tooltips field in your visuals
Second Approach:
If you prefer DAX you can use calculated columns with LOOKUPVALUE
Definition = LOOKUPVALUE( 'Data Dictionary'[Definition], 'Data Dictionary'[Metric], [Your Metric Field] )Third Approach:
Create a single reusable tooltip page that works for all metrics:
Create one tooltip report page
- Add a measure that detects the current contxt:
Current Metric Definition = VAR CurrentMetric = SELECTEDVALUE('Table'[Metric Name]) RETURN CALCULATE( SELECTEDVALUE('Data Dictionary'[Definition]), 'Data Dictionary'[Metric] = CurrentMetric )- Finally use this measure in your tooltip page
Bonus Approach:
- This is the modern approach which you can use field Parameters to create dynamic metrics then combine with your data dictionary
I recommend you Approach No.1 as it is the most Straightforward and Maintainable Solution 🎊❤️
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Hi Erosenthal,
For doing standardized tooltips from a data dictionary there is about 3 or 4 approaches you can try
First Approach:
you can use Field Parameters and Data Dictionary Table to achieve this:
- Create your Data Dictionary table in Power Query:
// Just An Example
let
Source = Table.FromRows({
{"Days in Warehouse", "Number of calendar days an item has been in warehouse storage", "Operations"},
{"Inventory Turnover", "Cost of goods sold divided by average inventory", "Finance"},
{"Order Fill Rate", "Percentage of orders completely filled from stock", "Operations"}
}, type table [Metric=text, Definition=text, Category=text])
in
SourceThen create relationships between your fact tables and the data dictionary
- Also use the Definition field directly in tooltips by adding it to the Tooltips field in your visuals
Second Approach:
If you prefer DAX you can use calculated columns with LOOKUPVALUE
Definition =
LOOKUPVALUE(
'Data Dictionary'[Definition],
'Data Dictionary'[Metric], [Your Metric Field]
)Third Approach:
Create a single reusable tooltip page that works for all metrics:
Create one tooltip report page
- Add a measure that detects the current contxt:
Current Metric Definition =
VAR CurrentMetric = SELECTEDVALUE('Table'[Metric Name])
RETURN
CALCULATE(
SELECTEDVALUE('Data Dictionary'[Definition]),
'Data Dictionary'[Metric] = CurrentMetric
)- Finally use this measure in your tooltip page
Bonus Approach:
- This is the modern approach which you can use field Parameters to create dynamic metrics then combine with your data dictionary
I recommend you Approach No.1 as it is the most Straightforward and Maintainable Solution 🎊❤️