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
Anonymous
Not applicable

Dynamic double Top 10

Hi 

 

I need help with this scenario

 

I have sales data which has product name, product group, region and sold units for year 2016 and 17

I want to display top 10 product groups based on the units sold in 2017 and within the groups i would like to show top 10 bestselling products also based on the 2017 units sold

 

i would like to use two slicers one is for the top 10 product groups and one for the region

Then i will show the top 10 products in table 

 

The top 10 products within the product group i will do with the top N filter. But I am struggling to create measure or column which will change the top 10 product groups every time i change the region. 

 

 

I created a table where I ranked the product groups by units sold in 2017 

Then i created another table which only displays the top 10 product groups and this i put in the slicer. However when I select different region the top 10 product groups do not change 

 

Can someone help 

 

Thank you 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

@Anonymous

 

Hi, i'm not sure if this what you need.

 

TOP.png

 

Use a Slicer to Regions

Use the New Table Visual to show the Top 10 Product Group

Use a Table to show the top 10 Products of the selected Group.

 

 




Lima - Peru

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Here is a test sample 

 

 

RegionProduct groupproduct sale 2017sale 2016
Germanysporta1278
Germanysportb1385
Germanysportc1141
Germanysportd111874
Germanysporte13471
Germanysportf4278
Germanycasual5445
Germanycasualh6487
Germanycasuali7842
Francesandalsj7554
Francesandalsk5564
Francesandals178
Francesandalsm3375
Francesporta3555
Francesportb561
Francecasual6733
Francecasualh6535
Francecasuali5333
UK sportd44134
UK sporte66542
UK sportf6554
UK sandals77364
UK sandalsm7878
UK sporta2475
UK sportb54255
UK casual7771
UK casualh3233
UK outdoorw4235
UK outdooru77866

 

 

and I would like to be able select UK in slicer - that will automatically pick the top N product groups for that region which will put display in slacer. 

In the product group slicer i will select one fo the product groups and it will show me the top N productc per that category

 

I hope it makes sence 

 

I was trying to TOP N meassure 

 

top 10 produc group = TOPN(10,SUMMARIZE('Test Table'
,'Test Table '[Product Group]
,"Sale 2017", SUM('Test Table'[Sale 2017])
)

 

but it didnt work the way i expected

Hi, @Anonymous

 

A measure can’t be used in a slicer. And it seems that the contents of a slicer can’t be changed dynamically. Maybe you can try to create two measures and a slicer. Then you can use filter to get the top N. You can have a try.

RankByProductGroup =
CALCULATE (
    RANKX ( ALL ( Table1[Product group] ), CALCULATE ( SUM ( Table1[sale 2017] ) ) ),
    ALLEXCEPT ( Table1, Table1[Region], Table1[Product group] )
)

 

RankByProduct =
RANKX ( ALL ( Table1[product] ), CALCULATE ( SUM ( Table1[sale 2017] ) ) )

Dynamic double Top 10.jpg

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft

 

Thank you for your reply 

I think i was not clear enough on what I am looking for. I dont need to display the ranking. I just want to uste the ranking as a filter/slicer to display the sale per product 

 

so the table should look like this

 

product      units sold

a                   12

b                   13

 

when the region slicer would be germany a product gruou slicer will be sport. As my data set is much larger than this test data i will only show the top 10 products within the top 10 product groups for all regions... 

 

 

 

@Anonymous

 

Hi, i'm not sure if this what you need.

 

TOP.png

 

Use a Slicer to Regions

Use the New Table Visual to show the Top 10 Product Group

Use a Table to show the top 10 Products of the selected Group.

 

 




Lima - Peru
Anonymous
Not applicable

hi @Vvelarde

 

This is exactly what i need just would like to have it in slicer, instead of new table so i can put it horizontal slicer on top of the dashboard. 

 

I would say it is alternative solution and i will try it out 

 

thank you 

 

 

@Anonymous

 

You can have a better look with a tree Map. 

 

TreeMap.png




Lima - Peru
Anonymous
Not applicable

hi @Vvelarde

 

How did you make all the groups equal size. When i try my data the panels are different sizes and i coulndt find the option to adjust it

 

thank you 

@Anonymous

 

I use a distinct count of Product Group in Values Section

 

DC+.png




Lima - Peru

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.