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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
WG-PBI
Frequent Visitor

Struggling with Ranking

I have a table called 'Sites' with the following columns

OrganisationIDSiteIDDate StartedTime to Start
4104428/06/201838
4104525/04/201210
4104810/01/202440
3109212/08/20220
3109305/02/202450
6905701/03/20236
71008404/09/20237

 

On my report page I have a table visual that contains the following columns:

OrganisationName (from a dimension table that shares OrganisationID)
Average Time to Start (which is the Time to Start column dragged in, and then set to average which is displaying the total average time to start per organisation accurately)

Date Started is on the many side of a *-1 relationship with my date table so that I can filter the page by 'Fiscal Year' which is a column present in the date table.

I am trying to add a column to my table visual that will dynamically rank the rows from lowest to highest total average start up time for each organisation but can't seem to figure this out.

Any help greatly appreciated as always! 😀

1 ACCEPTED SOLUTION

lbendlin_1-1714484957742.png

Rank = 
var a = SUMMARIZE(ALLSELECTED('Table'),[OrganisationID],"R",[Average Time to Start])
return rankx(a,[Average Time to Start],,ASC)

Average Time to Start = AVERAGE('Table'[Time to Start])

 

 

View solution in original post

3 REPLIES 3
WG-PBI
Frequent Visitor

So the end result I am looking for would do this...

OrganisationIDAverage Time to StartRank
6 (Big Bill's Buffalo Ranch)6.001
7 (Tiny Tim's Tiger Emporium)7.002
3 (Loud Lucy's Lion Zoo)25.003
4 (Grim Gary's Giraffe Safari)29.334

 

lbendlin_1-1714484957742.png

Rank = 
var a = SUMMARIZE(ALLSELECTED('Table'),[OrganisationID],"R",[Average Time to Start])
return rankx(a,[Average Time to Start],,ASC)

Average Time to Start = AVERAGE('Table'[Time to Start])

 

 

lbendlin
Super User
Super User

Don't include the Date Started or the Site ID in the visual.

 

lbendlin_0-1714480439248.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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