cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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.

Regards,

Sanket Bhagwat

1 ACCEPTED SOLUTION
Community Support

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:

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:

And you can get what you want.

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.

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:`

`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`

Community Support

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:

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:

And you can get what you want.

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.

Solution Sage

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.