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

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.

Reply
ljohnston
Regular Visitor

Suppress Visual if values are lower than a certain number

Hi,

 

I have a visual that summarizes race/ethnicity categories by student (one row per student). My bar chart visual is summing the number of applicants/students by their race/ethnicity.

 

When someone uses slicers to drill-down, I want the visual to not show at all if any of the race/ethnicity categories is below 3.  I can set a visual level filter on the # of students >3, but it only suppresses the category that is below 3 and I would like to suppress the entire visual. 

6 REPLIES 6
themistoklis
Community Champion
Community Champion

Hi @ljohnston

 

I agree with @v-shex-msft.

 

You need to create a measure and add it to the relevant objects as a filter. No need to add it to the object itself.

 

Generally in cases where you have for example a table with various measures as columns then if you want to exlude rows based on certain criteria, which apply to multiple measures, then you need to create a separate measure based on these criteria and use it as a filter.

v-shex-msft
Community Support
Community Support

HI @ljohnston,

 

Maybe you can try to write a measure to replace value column, add if statement in it to ignore calculation when race/ethnicity categories less than 3.

 

Please share some sample data for test if you are confused on coding formula.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Xiaoxin,


Thank you so much for your response. Here's some sample data. So my chart is summing student by fav color. I want a measure that says IF any of the favorite colors are less than 3, don't show the visual. 

 

StudentFav Color
1Red
1Pink
1Pink
1Red
1Blue
1Blue
1Blue
1Blue
1Red
1Red
1Green
1Green
1Green
1Green
1Green
1Green
1Yellow
1Yellow
1Orange

 



@ljohnston

 

Create a new measure using this DAX formula:

Filter_Column = SUM(Sheet1[Student])

Then Add it as a filter on the table and select Value greater than 3. Image below:

 

image.png

When I do that, it suppresses the categories (fav colors), with less than 3 but still shows those greater than 3.  If any of the catagories (fav colors) are less than 3, I don't want any of the categories to show (blank visual). 

@ljohnston

This functionality is currently not supported by PowerBI.

 

You can create an idea and post it on the PowerBI forum so as others to vote it (in case this idea doesnt exist already)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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