Forum Discussion
Tooltips that Respond Dynamically when Using the Drill-down Option on a Clustered Bar Chart
| Town | Country |
| Manchester | England |
| Leeds | England |
| London | England |
| Toronto | Canada |
| Vancouver | Canada |
| Montreal | Canada |
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
- AnonymousNot 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. - amitchandakSuper User
Anonymous , Refer if these can help you
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
- Greg_DecklerCommunity ChampionI believe you want ISINSCOPE instead of ISCROSSFILTERED
- Greg_DecklerCommunity ChampionHASONEVALUE could also work potentially.