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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rkpatelqlikview
Creator III
Creator III

How to consider max sales by comparing with two fields

Dear Experts,

Can anyone please suggest on this?

I do have below fields. Here i need to consider the sales based on the CheckID and PID but here PID will get duplicates and checkID unique numbers. At this situation we need to consider the only one sales which is highest number.

Below example:

Store ID : AP345, Check ID are 3 distinct numbers, PID are duplicates. Here the final sales should be 675, which is highest sales.

Thanks in advance.
Sales121.PNG

10 Replies
rkpatelqlikview
Creator III
Creator III
Author

Thanks Prashanth,

It's correct.

I used below one to get the maximum sales. Thanks again.

Final:

Load

*,

if(Sales=Maxsales,1,0) as flag Resident T1 where if(Sales=Maxsales,1,0) =1;

Regard.