Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RoaaR
Regular Visitor

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

1 ACCEPTED SOLUTION

@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)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@RoaaR Can you provide an example (image). Most tooltip values are simple aggregations like SUM, MAX, MIN, etc.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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

RoaaR_1-1664712984011.png

 

@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)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.