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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dealign with Slicer Nodes

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

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

1.PNG2.PNG

Best regards

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

1.PNG2.PNG

Best regards

Jay

Greg_Deckler
Community Champion
Community Champion

@Anonymous - Seems like you could use ISINSCOPE in a measure and put that in a card visualization, sort of like:

https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Most-Amazing-Mind-Blowing-Dynamic-Slicer-Title-Measure-Ever/m-p/429587#M154



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors