Forum Discussion
Default Tooltips (Know the formula or dax query behind it)
Dears,
Is there a way where I can find the formula behind a default tooltip value. I want to show the same value in another visualization but I don't know what's the dax query behind it to write.
Thanks
RoaaR Ah, it's a percent of total. Well, couple things to try. Otherwise I'll need to know more about your data, whether that Market Saving % is a measure, etc. But, let's say that is a measure, you can often click the little down arrow next to the measure in the field well of a visual and click Show As and then Percent of Total or Percent of Grand Total, etc. That would be the first thing I would try. Otherwise, you need to do something along the lines of:
Percent of Total VAR __Measure = [Market Saving %] //assuming this is a measure VAR __Table = SUMMARIZE(ALL('Table'),[Category],"__Measure",[Market Saving %]) VAR __Total = SUMX(__Table,[__Measure]) RETURN DIVIDE(__Measure, __Total, 0)
3 Replies
- Greg_Deckler
Community Champion
RoaaR Can you provide an example (image). Most tooltip values are simple aggregations like SUM, MAX, MIN, etc.
- RoaaRRegular Visitor
Thank Greg,
Below is an example: the tooltip is showing the weight of percentage calculated on an aggrigation level:
This (79%) value shown in tooltip is what I want to reach for different visuals & categorizatin
- Greg_Deckler
Community Champion
RoaaR Ah, it's a percent of total. Well, couple things to try. Otherwise I'll need to know more about your data, whether that Market Saving % is a measure, etc. But, let's say that is a measure, you can often click the little down arrow next to the measure in the field well of a visual and click Show As and then Percent of Total or Percent of Grand Total, etc. That would be the first thing I would try. Otherwise, you need to do something along the lines of:
Percent of Total VAR __Measure = [Market Saving %] //assuming this is a measure VAR __Table = SUMMARIZE(ALL('Table'),[Category],"__Measure",[Market Saving %]) VAR __Total = SUMX(__Table,[__Measure]) RETURN DIVIDE(__Measure, __Total, 0)