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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Wisselaar
Helper I
Helper I

Rank by an average over a period

I need to give a table wich contains top 10 error % over the last year. So I understood I need a ranking. But can't get it to work:

 

The average is in column 'Avg Error %' and is now sorted. In the column after I need the rank.

 

Wisselaar_0-1606335842744.png

 

I used: 
RANK Avg Error % =
RANKX( ALLSELECTED(ErrorTotalsDay[DtKey_Checkdate]); CALCULATE(AVERAGE(ErrorTotalsDay[Error % Day]));;ASC)

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey @Wisselaar Create these measures

Avg error = Avg(error)

Rank Avg Error = rankx(allselected(rulekey),[Avg error],,desc

Post this, drag this measure in table and in the filter pane just apply a filter that this measure should be less than 11, and it will always show top 10 records.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hey @Wisselaar Create these measures

Avg error = Avg(error)

Rank Avg Error = rankx(allselected(rulekey),[Avg error],,desc

Post this, drag this measure in table and in the filter pane just apply a filter that this measure should be less than 11, and it will always show top 10 records.

Wisselaar
Helper I
Helper I

The TOP N Filter option isn't there.

lkalawski
Resident Rockstar
Resident Rockstar

Hi @Wisselaar 

You don't need to create a Rank measure. You can use the filter panel and add a condition to show only TOP 10 values based on the Avg. Error % measure. 

lkalawski_0-1606336253109.png



_______________
If I helped, please accept the solution and give kudos! 😀

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.