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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Efsteps
Frequent Visitor

RankX with Multiples values problem

Hi everyone, i'm trying to get a rank from this database in this report:

click here to see

I'm trying with this two measures:
This one is make to made a filter ignoring 0 values i'm not sure if is doing it well:

MeasureAverageAnswered = CALCULATE(SUM(Sheet1[Answered]),
FILTER(Sheet1,Sheet1[Name] = MAX(Sheet1[Name])))


And the rank measure that i made is this one below:


Rank = RANKX(ALL(Sheet1[Answered]),[MeasureAverageAnswered],,DESC,Dense)

 

As you see on the image the rank measure only brings me number 1 value instead a rank

Rankx.JPG
Can someone Help me with this?

 

the files are on the top of this post

Thank You Very much for reading!

1 ACCEPTED SOLUTION
vivran22
Community Champion
Community Champion

@Efsteps 

 

Please ignore the previous post. Following are the required measures:

 

Rank Answered Asc = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,ASC
    )
)

Rank Answered Asc Skip = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,ASC,Dense
    )
)


Rank Answered Desc = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,DESC
)
)

Rank Answered Desc Skip = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,DESC,Skip
    )
)

 

It is ranking as accuretly

 

Rank.png

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

View solution in original post

3 REPLIES 3
vivran22
Community Champion
Community Champion

Hello @Efsteps ,

 

You may try this:

 

Avg Answered Time = AVERAGE(Sheet1[Answered])

Rank Answered Time1 = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    (Sheet1),
    [Avg Answered Time]
 )
)


Rank Answered Time = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    (Sheet1),
    [Avg Answered Time],,DESC,Dense
  )
)

 

Result:

 

Rank.png

 

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Appreciated your respoonse but the rank isn't correct based on the average every person as you see in your image some values haven't the right top position i've tried by myself and has the same results, is in fact an error that i have before i developed the posted formulas.

Any idea how to solve this?

rankx2.JPG

vivran22
Community Champion
Community Champion

@Efsteps 

 

Please ignore the previous post. Following are the required measures:

 

Rank Answered Asc = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,ASC
    )
)

Rank Answered Asc Skip = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,ASC,Dense
    )
)


Rank Answered Desc = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,DESC
)
)

Rank Answered Desc Skip = 
IF(
    HASONEVALUE(Sheet1[Name]),
RANKX(
    ALLSELECTED(Sheet1[Name]),
    [Avg Answered Time],,DESC,Skip
    )
)

 

It is ranking as accuretly

 

Rank.png

Cheers!
Vivek

If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.