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
DataGeek16
Frequent Visitor

Is it possible to restrict counts by threshold in report

Hi PBI experts! 

 

I am working on a usecase that requires the report to restrict the distinct user counts to > 20.

 

I have multiple filters in the report so there are multiple different ways the count of users could drop down to 20 or below. Is there a way to display nothing or a message 'Cannot determine values' when the counts fall below a certain hardcoded threshold value?

 

Appreciate the help!  

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@DataGeek16,

 

You may use ERROR Function in measures.

Measure =
IF (
    CALCULATE ( DISTINCTCOUNT ( Table1[user] ), ALLSELECTED () ) > 20,
    "OK",
    ERROR ( "Cannot determine values" )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-chuncz-msft. This helps. 

 

Further, in the measure is there a way to choose a specific color for the error statement? 

ERROR ( "Cannot determine values" )  in Red (say) ? 

 

@DataGeek16,

 

This is not supported.

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

Thanks! The only issue with using error function in this scenario is that when I click on the 'Show Details' portion of the widget, it says that there is a calculation error which in this case is not as I am willingly introducing an error to restrict data from being displayed. 

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.