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
po
Post Prodigy
Post Prodigy

Hiding visuals if number of rows selected < certain amount and display alternative message

Hi,

 

We have a report whereby users can select certain values in slicers and if number of rows < certain amont we don't want the results to be displayed and instead display a different message - this is in order to preserve anonymity.

 

How can this be best achieved? 

 

Alternatively if have column in table and when selected rows < certain value how can this best be achieved.

 

Tried 

 

if(DISTINCTCOUNT('table'[col])<10,"anon",MAXX('table','table'[col])) but dosen;t seem to work, similary with calculated column

 

Thanks

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @po ,

 

Try:

Measure = IF(CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))<10,"anno",MAXX(ALLSELECTED('Table'),'Table'[col]))

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@po , Try a meausre like

 

measure =
var _cnt = calculate(DISTINCTCOUNT('table'[col]), allselected('table'))
return
if(_cnt<10,blank(),MAXX('table','table'[col]))

Thanks for info

Thanks for info

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.