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
francesg
Helper I
Helper I

Top 100 records in table visualization and back to total original record count

Hi PBI Community

My project is to select the top 100 customers by Sales in 2019, 2020, and 2021 cumulative. The measure has been created by summing up Sales in 2019, 2020, and 2021.

I have a problem using the TopN table with generating series. I have already placed my TopN slicer and TopN values which I drag in the visual filter with conditions greater than = 0. I already achieved displaying my records in the top 100. Apparently, when I select 0 - it should be back to the original total count. 

The original total records are 998. When applying the TopN slicers and select to 0 the expected should be 998 as well. But the result is 518 only because of the measure with the condition. 

Any suggestion appreciated to get the top 100 records and get the original total count of records. 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

View solution in original post

Anonymous
Not applicable

Hi @francesg ,

How about using rankx?

I have  created a simple sample, please refer to it to see if it helps you.

Create a column.

Column = RANKX(FILTER('Table','Table'[subject]=EARLIER('Table'[subject])),'Table'[VALUE],,DESC,Dense)

vpollymsft_0-1654756542954.png

Then filter the data.

vpollymsft_1-1654756588461.png

vpollymsft_2-1654756596660.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @francesg ,

How about using rankx?

I have  created a simple sample, please refer to it to see if it helps you.

Create a column.

Column = RANKX(FILTER('Table','Table'[subject]=EARLIER('Table'[subject])),'Table'[VALUE],,DESC,Dense)

vpollymsft_0-1654756542954.png

Then filter the data.

vpollymsft_1-1654756588461.png

vpollymsft_2-1654756596660.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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.