Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Padma123
Creator
Creator

Dense Rank

Hello Qlik Experts,

I need a solution for the simple and tricky one 

I have sample inputs like 

sales

100

200

null

null

null

300

null

400

null

null

for this data i need dense rank like 

sales     rank

100        1

200        2

null       2

null       2

null      2

300      3

null      3

400     4

null    4 

null    4

for null values take the previous non null value.

Labels (3)
3 Replies
BrunPierre
Partner - Master II
Partner - Master II

NoConcatenate
Final:
LOAD RowNo() AS RowID,
Sales,
if(not IsNum(Sales),Peek('NewSales'),Sales) as NewSales
Resident Data;

Left Join(Final)
LOAD RowID,
AutoNumber(NewSales,'RowID') as Rank

Resident Final;
DROP Table Data;

Padma123
Creator
Creator
Author

not from back end ,can you do it chart itself.

BrunPierre
Partner - Master II
Partner - Master II

Optimally, it's better at the back end. Anyway, you can try this and ensure the chart is sorted properly.

NewSales: If(not IsNum(Sales),Above(TOTAL Column(1)), Sales)

Rank: Rank(Column(1),1,1)