Rank () Command - Standard Rank vs Dense Rank - Can I avoid Dense Rank?

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hi all,

I am working in Jasper Server v7.5
I am using the Rank () function 

The Rank () function works for me.
However when I have records in my report with the same value, and which are tied on the rank, they being assigned the same Rank Value, but the Jaspersoft Rank () function is NOT skipping the next sequential ranking position.

Example from my Jaspersoft Report:

Where the 2 records with MARK = 943 are tied on Rank = 6,  the next 3 records tied on MARK = 941, are assigned Rank = 7.
Instead I am looking for the Rank () command /function to skip from Rank 6 to Rank 8.

I can do this in Oracle SQL no problem.
This is my corresponding Ranking Report written in Oracle SQL in SQL Developer.
When I use the Oracle Rank () command, it skips the next sequential ranking when there is a Tie on the ranking position.


Based on the below Definitions of Rank () vs Dense_Rank () from Oracle SQL, it appears that the Jaspersoft Rank () command is a DENSE_RANK rather than a Standard RANK:

"RANK() gives you the ranking within your ordered partition. Ties are assigned the same rank, with the next ranking(s) skipped. So, if you have 3 items at rank 2, the next rank listed would be ranked 5."

"DENSE_RANK() again gives you the ranking within your ordered partition, but the ranks are consecutive. No ranks are skipped if there are ranks with multiple items."

Question - Is there any method / command in Jaspersoft Server where Rank () will result in Ties being assigned the same rank, with the next ranking(s) skipped?

Thank you

Jason Sheehan
Cork - Ireland


jason.sheehan's picture
Joined: May 16 2022 - 9:37am
Last seen: 1 month 2 weeks ago

0 Answers:

No answers yet