Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ysalvi4321
Contributor II
Contributor II

wan to implement rank function on bases of 2 columns

Hello Team,

I want to achieve rank on the bases of two columns, attaching raw data for your reference, and implemented the rank function on the front end but it didn't work.

ysalvi4321_0-1682484586132.png

Can you please tell me how we can acheive row number (col C ) as Output.

Thanks in Advance

 

5 Replies
Prem0212
Creator
Creator

I think your Question is not clear to understand and i am giving an example here with an expression    Aggr(Rank(sum(Sales)), Region, City).   This function calculates the rank based on two fields Region and City

Rams-
Creator
Creator

Hi,

You can use the following expression which is based on:

sum([Quo No]) + sum(Quotation)

I have applied the following expression:

Aggr(Rank(sum(Quotation)+sum([Quo No])), Quotation, [Quo No]),  you can label this expression as Row Number

Output:

Rams_0-1682502293126.png

Hope this helps,

help user find answers ! don't forget to mark  a solution that work for you and click the like button!

 

ysalvi4321
Contributor II
Contributor II
Author

Is this possible to implement the same logic in the backend??

Rams-
Creator
Creator

You can use the sum function in backend, but for aggr and rank function you have to do it in front end

Kushal_Chawda

@ysalvi4321  try below

Data:
Load * Inline [
Quotation, Quo No
1,1
1,2
1,3
2,1
2,2 ];

New:
Load *,
AutoNumber(RecNo(),Quotation) as Rank
Resident Data
Order by Quotation,[Quo No] desc;

Drop Table Data;