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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Alocin
New Member

Hide a matrix visual unless a field is filtered

Hi all, I am a newbie with Power BI - only started a few weeks ago, so please excuse me if I'm asking basic questions.

 

I have a matrix visual that displays percentages of counts. I want to ensure this matrix is hidden unless a filter is applied to a particular field (controlled by a splicer). The reason is that if more than one item is selected in the matrix, the percentages are calculated per total count, not count per item. So to avoid people reporting 'fake' percentages', I want to hide the table unless only one item is selected. I created a measure as follows:

 

Measure = int(isfiltered('TableName'[FieldName]))
 
Then on the matrix visual I added a filter as follows:
 Alocin_0-1710815088916.png

This does not work at all - it appears to be ignored completely. However when I do the exact same method (same measure, same filter, same splicer) to a column graph, the column graph is blank unless a value in the splicer is selected. But somehow it doesn't work on a matrix?

 

Important to note that all the data is from one table - data for matrix, graph, splicer all from the same table. So no relationship issues should be at play. The matrix has 2 field in Row, and 1 field in column.

 

i would appreciate some help!

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @Alocin ,

 

try this measure:

 

Measure = CALCULATE(
    int(ISFILTERED(TableName[column_name])),
        ALLSELECTED(TableName[column_name]))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Idrissshatila
Super User
Super User

Hello @Alocin ,

 

try this measure:

 

Measure = CALCULATE(
    int(ISFILTERED(TableName[column_name])),
        ALLSELECTED(TableName[column_name]))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank You! this worked perfectly!
Ritaf1983
Super User
Super User

Hi @Alocin 
See my solutions in the linked posts included attached to them PBIX. Both use the same logic, creating DAX to test user choices and manipulate conditional formatting. 

https://community.fabric.microsoft.com/t5/Desktop/Powerbi/m-p/3615548

https://community.fabric.microsoft.com/t5/Desktop/Show-and-Hide-image-based-on-slicer-selection/m-p/...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.