Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kaiser_dias
Contributor
Contributor

Ranking two similar separated tables

Hi guys!!!

I've tried to rank two separated tables but, with similar datas. After this, I just would like to get the number 1 of each table joing it in a table. However, I need to rank each type on each table. Let me example it below:

 

Test1:
Load * Inline
[Description1, Value1
A,30
A,45
A,33
B,20
B,29
B,63
B,49
B,05
C,25
C,73
C,80
C,15
];


Test2:
Load * Inline
[Description2, Value2
A,50
A,61
A,90
A,30
A,95
B,10
B,08
B,18
B,29
B,55
C,15
C,25
C,09
C,01
C,19
];

 

Max_Test1:
Load
Description1,
Value1,
AutoNumber(RowNo(),[Description1]) as Rank1
Resident
Test1
Order By Value1 desc;

Max_Test2:
Load
[Description2],
Value2,
AutoNumber(RowNo(),[Description2]) as Rank2
Resident
Test2
Order By Value2 desc;

Drop Tables Test1,Test2;

clipboard_image_0.png

The first table is perfect. But the second.

I'd have the first (Rank=1) of A, B, C at tables Max_Test1 join Max_Test2. Max value of each description at each table.

Waited result:

DescriptionValue1Value2
A4595
B6355
C8025

 

Since now, thanks guys.

 

Kaiser Pereira

2 Replies
Anil_Babu_Samineni

Can't you simply?

Min(Value1)

Max(Value2)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kaiser_dias
Contributor
Contributor
Author

Thanks @Anil_Babu_Samineni  but, unfortunately no.

 

It's because I need the Max of each description, over each table. 

 

Max of A, max of B AND max of C on each table