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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SanketBhagwat
Solution Sage
Solution Sage

Show dynamic Top N and other values.

 
I need to create a dynamic measure taht will show Top N values accoridng to slicer selection and other values as OTHER.

I first created a dynamic Top N slicer according to Customer, but then I was not able to proceed further.

I found one article on the community,https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dynamic-dashboard-that-shows-TOP-N-and-OTHER-...

but that didn't gave me a satisfactory answer.

If someone knows any workaround then do please let me know.

I have attached screenshot of the data.

Screenshot (100).png

 

Regards,

Sanket Bhagwat

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @SanketBhagwat 

According to your description, I can roughly understand your requirement, I think you can try these measures to achieve your requirement:

First you should create a table for the slicer, which you seems to have finished:

v-robertq-msft_0-1623380453964.png

 

  1. Create three measures like this:

 

SumRevenue = SUM('Table'[Revenue])
Rank =

RANKX(ALL('Table'),CALCULATE([SumRevenue]),,DESC,Dense)
SumRevenue1 =

var _topN=SELECTEDVALUE(Slicer[Top N])

return

IF([Rank]<=_topN,[SumRevenue],"OTHER")

 

  1. Then you can create a slicer and a table chart to place them like this:

v-robertq-msft_1-1623380453972.png

v-robertq-msft_2-1623380453976.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
Anonymous
Not applicable

Hi everyone, I'm new to power bi. Please help me separate the data from the virtual table into the corresponding tables as follows:

 

nghia69371_0-1623377922390.pngnghia69371_1-1623380055937.png

I want to separate the data lines and from the arrow to fill the data before the arrow in the columns in the respective tables, please help me, thanks a lot

 

v-robertq-msft
Community Support
Community Support

Hi, @SanketBhagwat 

According to your description, I can roughly understand your requirement, I think you can try these measures to achieve your requirement:

First you should create a table for the slicer, which you seems to have finished:

v-robertq-msft_0-1623380453964.png

 

  1. Create three measures like this:

 

SumRevenue = SUM('Table'[Revenue])
Rank =

RANKX(ALL('Table'),CALCULATE([SumRevenue]),,DESC,Dense)
SumRevenue1 =

var _topN=SELECTEDVALUE(Slicer[Top N])

return

IF([Rank]<=_topN,[SumRevenue],"OTHER")

 

  1. Then you can create a slicer and a table chart to place them like this:

v-robertq-msft_1-1623380453972.png

v-robertq-msft_2-1623380453976.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Thanks @v-robertq-msft  for the reply.

Yes, I think that can be one of the ways to achieve the same.

Although visually it doesn't look proper, but it definitely serves the purpose. 

 

Regards,

Sanket Bhagwat

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.