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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors