Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
syed_khadir
Partner - Contributor II
Partner - Contributor II

Tie breaker Firstsortedvalue + Rank + Sum with Multi Dimensions

Hi All,

I am stuck with a calculation wherein I want to display the attribute from multiple dimensions based on the top value. Due to the design I cant go with Straight Table or Pivot... And I have to opt for Text object.

I have around 15 dimensions based on that I need to show the Top 10 in each Text object since this is going to be dynamic I cant do this in load script.

I am trying to do it using Firstsortedvalue(Dim1, rank(sum(measure),4,1), Dim1,Dim2....)

The challenge is when we have tie breaker the value isnt displayed... Basically want a unique rank evenwhen there is similar values as I have to code it under each text objects.

Please advise. Thank you

3 Replies
sunny_talwar

What if you use DISTINCT

FirstSortedValue(DISTINCT Dim1, Rank(Sum(measure), 4, 1), Dim1,Dim2....)

syed_khadir
Partner - Contributor II
Partner - Contributor II
Author

I did that buddy it didn't work out... But I have managed to get it solved during the weekend will write down when I have some time.. Till then I will keep this open so I remember..

Thank you so much for your help.. 🙂

tahreen371
Contributor III
Contributor III

Hello Ahmed,

Curious to know how did you get it done... Because Firstsortedvalue function fails when you have same values..

Please let me know anytime you are free.

Thanks in advance