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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

TOPN

Hi All,

 

I'm very new to PowerBI, so not sure if this is even the location I need to post to.  I'm having difficulty working with topN.  I have to use topN for one of my charts but need it to associate with all slicers and drilldowns chosen on the dashboard.  Can someone provide any ideas on how to get this to work. 

 

Example, I have 5 charts and 4 slicers on my dashboard.  One chart is supposed to be a treemap showing the top 5 ID's contributing to whatever is drilled down from one of the other 3 graphs AND whatever slicer value chosen.  Is there a way to do this?  OR if this was already answered, can someone point me to it?

 

Thanks!

TP

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You can use a visual level TOPN filter or create a TOPN measure

 

example

calculate([Net Sales PY], TOPN(2, allselected('Address'[Country ISO]), [Net Sales PY],desc), values('Address'[Country ISO]))

 

refer: TOPN: https://youtu.be/QIVEFp-QiOk 

 

Others

 

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

Power BI- Power BI- TOPN with Others- https://youtu.be/I_TY4hVlzAE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors