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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
_power_bi
Helper I
Helper I

Large Table Visual that Needs Filtering on RowCount

I have a large table visual where the source is 2M+ rows.  I want to filter the table where only the first 25,000 will appear in the table.  I have a secondary table filter named InDateRange that is filtering based on the dates in the datepicker and disconnecte date table. This results in a 1 or 0. If 1 then it will appear in the table.  My problem is that when I apply the TopN filter to the table visual along with the InDateRange filter, the TopN is applied first. So It filters to top 25k, then the second filter is applied.  This sometimes returns 0 results when there should be many results.  I have tried using a measure to filter a rankx measure, but the table just spins and never updates. Is there not an easy to way to apply a TopN when another filter is applied?

5 REPLIES 5
lbendlin
Super User
Super User

There is no need.  Power BI automatically applies a TOPN(501) to your table visual, and then waits for the report user to scroll before calling the next batch.

There is a need.  This is a large (wide) table.  Without filtering the rows, it will eventually not render the visual. 

As a report designer you need to push back on this.  There should be no horizontal scrollbar in any of your visuals, and very limited vertical scrolling.

I agree with you. This is not my choice. Still an issue though. 

Anonymous
Not applicable

Hi @_power_bi ,

Try combining two filters together using a sequential structure.

Like:

 

topN Filter = IF( [InDateRange] = 1, RANKX(ALLSELECTED('Table'), CALCULATE(SUM('Table'[Value])),,DESC,Dense))

vcgaomsft_0-1718332381332.png

 

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors