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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
DPJay
Regular Visitor

Top N Filter

Hello,

 

I'm trying to rank locations based on a dynamic Top N filter using parameters. It seems to work if I have only loc2_name in my table view but when I add the location&state field as well to the view the ranks are shown as 1 . Can anyone help me on what I'm missing here.

 

Inkedsupplier_loc_ranking_LI.jpg

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @DPJay

As tested, when all columns added to the Table visual is set as "don't summarize", create a measure as below may works

Note: compare with yours, please pay attention to the bold character.

Measure = IF(HASONEVALUE(Table1[late]), RANKX(ALL(Table1),[value],,DESC))

9.png

 

 

 

Best Regards

Maggie

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @DPJay

As tested, when all columns added to the Table visual is set as "don't summarize", create a measure as below may works

Note: compare with yours, please pay attention to the bold character.

Measure = IF(HASONEVALUE(Table1[late]), RANKX(ALL(Table1),[value],,DESC))

9.png

 

 

 

Best Regards

Maggie

rajulshah
Resident Rockstar
Resident Rockstar

Hello @DPJay,

 

Can you please share the formula for measure used for the rank?

Hello,

 

Rank Measure = IF ( HASONEVALUE ( FINAL_TBL[location&state] ), RANKX ( ALL (FINAL_TBL[location&state]), [TOT_QTY] ) )

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.