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.
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!
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.
@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/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |