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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Sean
Community Champion
Community Champion

Map and a Table / or Matrix

I have a map with many locations and a table with additional info for those locations next to it.

 

I want the table to only be visible when the user clicks on a single location.

 

Any ideas?

 

1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

I would use that filter check to return blank on any measures you don't want shown. Then filter the page with those measures as not blank.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

I was thinking HASONEFILTER() but I couldn't get that to work correctly. My understading must be incomplete. Basically, the idea was to create a column:

 

IsFiltered = IF(HASONEFILTER([Location]),"True","False")

 

Then set a visual filter on the table to filter out only True values. The theory being that clicking on a country would set HASONEFILTER to True and then the table would display that country's information, otherwise the table would be blank.

 

However, I can't even get ISFIILTERED or HASONEFILTERED to work correctly as per the walk-through documentation in ISFILTERED.



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

I ran into similar confusion trying to use ISCROSSFILTERED. I think the way it works is that you are checking to see if what you have selected filters something else. It's a bit counterintuitive, but basically you're checking on how your selection affects other things, rather than checking directly if you have that thing selected. So you wouldn't check HASONEFILTER([Location]), you'd check HASONEFILTER([SomeOtherColumnThatWouldBeFilteredBySelectingOneLocation]). Maybe a location index column. Or, from what I ended up doing in my own measures you might get good results by checking filters on a higher level of location heirarchy. So if you are selecting states or provinces, try HASONEFILTER([Country]).





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Sean
Community Champion
Community Champion

Thanks for the suggestions! I created a measure with => ISFILTERED => and it works correctly!

 

FALSE when no locations are selected and TRUE when you click on one!

 

However as you can see in the picture - there's nothing to select in the Visual level filters and I can't drag it to the Page level filters

Filters.png

 

KHorseman
Community Champion
Community Champion

I would use that filter check to return blank on any measures you don't want shown. Then filter the page with those measures as not blank.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Sean
Community Champion
Community Champion

Thanks! For some reason I couldn't get True() and False() to work - but assigning Blank () when IF ( ISFILTERED... is True works!

 

greggyb
Resident Rockstar
Resident Rockstar

ISFILTERED() - is there any filter context explicitly on the field named within. The named field must be an axis, legend, table row (PV table, not PP table), matrix row/column, slicer, and/or slicer. What selection is made does not matter, only that some selection other that "Select All" is made.

 

ISCROSSFILTERED() - is there any filter context explicitly on the field named within OR is there any filter context on another field which can filter the named field. All conditions above still return true. The following also return true: another field in the same table fits the criteria above; another field in a table that exists on the one side of an active relationship (or anywhere in a chain of such relationships) to the table the named field resides in fits the criteria above; another field in a table on either side of an active bi-directional relationship (or anywhere in a chain of such relationships) meets the criteria above.

Essentially - has some selection been made which may reduce the number of items considered in the named field.

 

HASONEFILTER() - Meets criteria of ISFILTERED() AND the result of that filter is a single distinct value in context for the named field.

 

HASONEVALUE() - Any circumstance which causes the named field to have only one distinct value - it could be that that's all there is, or the field is filtered in some way (direct or cross filter) to leave only one distinct value in context.

Try creating it as a column instead of a measure.



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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors