I need the rank function to do a dense rank in Webi. Currently the default behavior of the Rank() function returns the following ranking: 1,2,3,3,5. If two values tie for 3rd place, the next number in sequence returned is 5. I need it to return 4. Does anyone know a workaround to get this done?
I saw one possible solution listed on the boards, but I get Context error when I try to implement it.
Even i had the issue of displaying theranking has 1,2,3,3,5.
And i made a small change to the formula given by ERE and it worked fine and now i get the ranking as 1,2,3,4,5 .Please see the quote for change i ahve done
But if the ranking is dispayed is 1,2,3,3,3
then after applying the above formula i get the ranking as 1,2,3,4,4.
But i should get it dispalyed as 1,2,3,4,5
Can anyone suggest the change i have to do the formula…
i have DENSE_RANK() in the universe. and below is the steps that i followed.
Steps:
Create a object and in thhe defintion part from the Functions tab under Number, there is function like
in the PARTITION BY and ORDER BY clause define the objects as per the requirement.
Please see the sample code which i have defined
i got the desired results as below
Quarter Number of Prints Ranking
3 2 1
3 2 1
3 2 1
3 5 2
=If [Rank]=Previous([Rank]) And [Rank]=Previous([Rank];+2) And [Rank]=Previous([Rank];+3) Then [Rank]+3
ElseIf [Rank]=Previous([Rank]) And [Rank]=Previous([Rank];+2) Then [Rank]+2
ElseIf [Rank]=Previous([Rank]) Then [Rank]+1