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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Briggany
New Member

Issues with TOP N not working.

Hello,

 

Quick bit of context. Building a table to show the past 13 weeks worth of policy sales for financial advisers. I have a column for Unique ID (UID), name, the company they work for and then the proceeding 13 columns have the total policies for the current and previous 12 weeks. 

I need to create a top 10 version of this table to show the top 10 Advisers for the current week. I know I can do thiss using the top N function and filter on the Adviser UID. I have tried to change the UID filter on the visual to top N but it is not giving me the option to apply the filter. 

Further more the videos/guides/help in this forum I can find show the filter section looking completely different to what I can see, showing the ability to choose how many of the top N to show and a different lay out. 

 

TopN.PNG

1 ACCEPTED SOLUTION

Hello, thanks fo ryour rpely but I actualy found that I can type the Top N number next to where it says "Top N" in my screen grab. Turns out that there is not box outline so you wouldn't know its there, it was through pur dumb luck that I found it. 

Might be something for Power BI to look at in the future. 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Briggany , First create a This week measures

 

example

 

This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

 

where Rank

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format

 

Then You TOPN

https://youtu.be/QIVEFp-QiOk

 

example

CALCULATE(concatenatex(Table, Table[ID]) ,TOPN(10,allselected(Table2[Reason Name]),calculate(Count(Table1[ID])),DESC),VALUES(Table2[Reason Name]))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello, thanks fo ryour rpely but I actualy found that I can type the Top N number next to where it says "Top N" in my screen grab. Turns out that there is not box outline so you wouldn't know its there, it was through pur dumb luck that I found it. 

Might be something for Power BI to look at in the future. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.