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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Marcin11
New Member

Show Hide Card based on the slicer selection

Hi there, 
I am trying to show/hide a part of the report using a CARD acting as a mask. 

Point being if there is nothing selected on the slicer (country) I want the card/mask to be visible telling the user to select a country. If there is something selected on the slicer then I want to hide the mask and show something else.

For that purpose I have created 3 measures:

 
Measure 1: IsFilterCategory =
INT(ISFILTERED('Measures and Index (new)'[Country]))
Measure 2: 
Message =IF([IsFilterCategory]," ","Please Select a Country")
Measure 3: 
MakeIt Transparent =IF([IsFilterCategory],"#FFFFFF00","White")


Once the card/mask is created I am going to the background and I am trying to set the backgroud color based on the 3rd measure.

And here is the kicker - In one report it works fantastic on the other it doesn't - it is just not possible to select the measure as a field 😞 

Marcin11_0-1718198070260.png

 

Why does it happen that onone report it works, on the other it just doesn't. What am I missing ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Marcin11 

Check your version to make sure you edit both reports in the same version of Power BI Desktop. Features and functionality may sometimes vary from version to version. If a report is an older version, consider updating to the latest version.

Check for any differences in how Metrics and Indices (NEW) [Country/Region] are used or defined in the data model or in the two reports. The behavior of the ISFILTERED function can be affected by the structure or relationships of the model.

The ability to dynamically set attributes, such as background color, based on a metric is a feature with specific requirements. Make sure that the visual you're trying to modify supports conditional formatting based on measures. For more information about conditional formatting in Power BI, you can refer to the following documentation:

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Check to see if any view-level filters are applied to cards in the report that don't recognize the measure. Sometimes, filters interfere with the evaluation of a measure.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @Marcin11 

Check your version to make sure you edit both reports in the same version of Power BI Desktop. Features and functionality may sometimes vary from version to version. If a report is an older version, consider updating to the latest version.

Check for any differences in how Metrics and Indices (NEW) [Country/Region] are used or defined in the data model or in the two reports. The behavior of the ISFILTERED function can be affected by the structure or relationships of the model.

The ability to dynamically set attributes, such as background color, based on a metric is a feature with specific requirements. Make sure that the visual you're trying to modify supports conditional formatting based on measures. For more information about conditional formatting in Power BI, you can refer to the following documentation:

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Check to see if any view-level filters are applied to cards in the report that don't recognize the measure. Sometimes, filters interfere with the evaluation of a measure.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

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.