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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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]))

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

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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