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

Dont show Chart when is too filtered, and has few data

Hello everyone, 

 

I m using a base of customer behavior  that allows many types of filter. If i use many filters, sometimes the chart is made from too few data, and the information is no longer reliable. Is there a way to dont show the plot if i have few data depending on the granularity?

 

Thanks 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Share =
VAR min_id =
    CALCULATE(DISTINCTCOUNT ( base[ID_client] ); ALL ( base[Brand] ))
RETURN
    IF (
        min_id > 5;
        SUM ( base[Total] ) / CALCULATE ( SUM ( base[Total] ); ALL ( base[Brand] ) )
    )

this worked, thanks

View solution in original post

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Can you share a sample, please? Please mask the sensitive data first. 

The solution could be adding a condition in a measure. It's dynamic. I don't aware any other solutions that would watch the number of results.

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Here is as sample example.pbix

I
 want to calculate the marketshare of each brand in different cities., the data is based on consumption of different people.  If my base has too few people in a city, i dont want to calculate de marketshare.

 

If i use a formula like this, it ll evaluate for every brand (in legend) and not the whole chart.

 

Thanks

 

 

Share =
VAR min_id =
    DISTINCTCOUNT ( base[ID_client] )
RETURN
    IF (
        min_id > 5;
        SUM ( base[Total] ) / CALCULATE ( SUM ( base[Total] ); ALL ( base[Brand] ) )
    )

 

Anonymous
Not applicable

Share =
VAR min_id =
    CALCULATE(DISTINCTCOUNT ( base[ID_client] ); ALL ( base[Brand] ))
RETURN
    IF (
        min_id > 5;
        SUM ( base[Total] ) / CALCULATE ( SUM ( base[Total] ); ALL ( base[Brand] ) )
    )

this worked, thanks

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.