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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Tooltips that Respond Dynamically when Using the Drill-down Option on a Clustered Bar Chart

Hey,
 
If I have Town and Country like follows:
 
TownCountry
ManchesterEngland
LeedsEngland
LondonEngland
TorontoCanada
VancouverCanada
MontrealCanada

 

I have plotted a a clustured bar chart with Country and Distribution with drilldown ability so you can click England and see the distribution breakdown in each town on my Dashboard.

I want to create a tooltip whereby if you hover over Manchester it will say Manchester and if you hover over the graph when it is on England it will say England.  This is because I am putting segment relatated info on my tooltip.

 

Since both country and town are on one graph I am struggling to write this in DAX.

 

I had a go but its completely wrong:

Measure = IF(ISFILTERED('Table'[Country]),'Table'[Country],'Tablel'[Town])

 

Can anyone help please?

 

Thanks!

4 REPLIES 4
Anonymous
Not applicable

Thank you everyone!

 

It works with either ISFILTERED, HASONEFILTER and HASONEVALUE (but not ISINSCOPE).

 

It was my logic that was faulty because town will always line itself and into country but a country only lines into itself. When I had it the other way around it just kept showing me country.

 

Measure=IF(ISFILTERED('Table'[Town]),VALUES('Table'[Town]),VALUES('Table'[Country]))
 
Using that on my tooltip allows me to scroll over my clustered bar chart and no matter what drilldown level it is it will show the town (or country) depending on which level I select.

 

Greg_Deckler
Super User
Super User

I believe you want ISINSCOPE instead of ISCROSSFILTERED

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

HASONEVALUE could also work potentially.

@ 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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