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.
I have a scenario where I have hierarchical data that I want to use to filter visualisation.
Example Data set is a simple, two column, table of COUNTRY and TOWN.
I have dragged on a SLICER control and added COUNTRY and TOWN to it, and opted for SINGLE SELECTION.
(It is useful to include COUNTRY in the slicer since TOWN could be duplicated and the list might be very long).
I also have a simple CARD which I want to display the selected TOWN.
The problem is two-fold:
1. I can't stop the user clicking on the COUNTRY node of the slicer (selecting a country) which actually automatically select ALL the TOWNs under that node (which is annoying since I've elected single selection).
2. If I accept that they can select a COUNTRY then the data showing on the page is actually a summary of the countries TOWNs, which might be useful, but.... I can't get the CARD to to show the COUNTRY name instead of the (first) TOWN.
I've tried the 3rd-party Hierarchy Slicer, which addresses the first issue, but for some reason it renders horrible (like an out-of-focus image), and just spoils the dashboards.
So... has anyone found a nifty way to control node selection on a slicer ?
Or...
Can anyone suggest some nifty DAX to show the COUNTRY if it's selected, and TOWN if COUNTRY isn't selected ?
(sorry for the long winded explanation).
Solved! Go to Solution.
Hello @EnateJon ,
Check this measurement.
Measure = IF(DISTINCTCOUNT('Table'[town])=1,SELECTEDVALUE('Table'[town]),SELECTEDVALUE('Table'[country]))
The result would be displayed as shown below.
Best regards
Jay
Hello @EnateJon ,
Check this measurement.
Measure = IF(DISTINCTCOUNT('Table'[town])=1,SELECTEDVALUE('Table'[town]),SELECTEDVALUE('Table'[country]))
The result would be displayed as shown below.
Best regards
Jay
@Anonymous - Seems like you could use ISINSCOPE in a measure and put that in a card visualization, sort of like:
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 |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |