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
ThomasDay
Impactful Individual
Impactful Individual

Don't show visual if too many rows--cannot find a way to do this

Hello all,

 

I am really finding the visual level filtering pretty difficult to manage.  The situation I'm dealing with is surely common.  A user uses slicers to find a selection to view--a series of visuals show the data.  But what if it's a ton of data--say the slicers are sequential -- it's possible to start big and narrow things down.   At some point you'd like to see the results.  

 

In my case, users can pick owner type (Govt, Investors, NotForProfit), attribute (Urban, Rural), Size (5 ranges of sizes).  The starting point is a slicer clear-all (i.e. no filter) and there are 5000 rows to show!!  I'd like to show things when the counts are below 1000 (not to mention that on Powerbi.com, the visual can't handle all the data.

 

The visual is a table--with 10 columns.  All are table columns--text and ONE AVG(numeric).

Capture.PNGI am unable to get a visual level filter to work if there are more than 1000 rows.  I've tried the following code--putting each in the visual level filter and using advanced filter to say <1000 (or =Y) for TooManyFacilSlicerCheck.  Nothing happens...  What am I missing?  Thanks!  Tom

ReptRecNoCount = COUNTROWS(ReptRecNoProviderStage1Export)
TooManyFacilSlicerCheck = IF(CALCULATE(DISTINCTCOUNT(ProvidersStage1Export[Hospital_Name]),
ALLSELECTED(ProvidersStage1Export[Hospital_Name]))< 600,"Y","N")
ReptRecNoCount= If(ISFILTERED(ReptRecNoProviderStage1Export[Ownership]), COUNTROWS(ReptRecNoProviderStage1Export))

 

1 ACCEPTED SOLUTION
chrisu
Responsive Resident
Responsive Resident

Try adding an ALLSELECTED filter to your first measure with the table as the argument:

 

ReptRecNoCount = CALCULATE(COUNTROWS(ReptRecNoProviderStage1Export),ALLSELECTED(ReptRecNoProviderStage1Export))

 

The table rows themselves are setting a filter context for COUNTROWS, so that for each row [ReptRecNoCount] evaluates to 1.  Adding ALLSELECTED with the table as the argument (not a single column) should override that and recalculate correctly based on  slicer selections.  

View solution in original post

2 REPLIES 2
chrisu
Responsive Resident
Responsive Resident

Try adding an ALLSELECTED filter to your first measure with the table as the argument:

 

ReptRecNoCount = CALCULATE(COUNTROWS(ReptRecNoProviderStage1Export),ALLSELECTED(ReptRecNoProviderStage1Export))

 

The table rows themselves are setting a filter context for COUNTROWS, so that for each row [ReptRecNoCount] evaluates to 1.  Adding ALLSELECTED with the table as the argument (not a single column) should override that and recalculate correctly based on  slicer selections.  

ThomasDay
Impactful Individual
Impactful Individual

Thanks very much, AllSelected is a great catch--and using the magical Calculate to get it done...  It works.  Nicely done.  Tom

 

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.