Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rulohx87
Contributor III
Contributor III

Crosstable and max()

I need to get rank for the cross table. This is my code for the max value:

     =Pick( Match(Max(Values), sum(bob), sum(pierre), sum(brain)),'C:\first.png', 'C:\Second.png', 'C:\Third.png')

it works with one selection but not for multiple selection Ej (R1, R2, R3)

Cross table

Region     Seller     Values

R1          BOB          12

R1          PIERRE     23

R1          BRAIN       47

R2          BOB          32

R2          PIERRE     30

R2          BRAIN       42

...

Table original

Region      BOB     PIERRE     BRAIN

R1               12          23          47

R2               32          45          10

R3               25          21          20

how obtain the first, second and third ?

Please help me. Thx

1 Solution

Accepted Solutions
rulohx87
Contributor III
Contributor III
Author

I just solve the problem. This is my solution:

=IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_1),sum(Vendedor_1),

IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_2),sum(Vendedor_2),

IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_3),sum(Vendedor_3))))

Thanks for the reply

View solution in original post

2 Replies
sujeetsingh
Master III
Master III

Rau ,

For this you can use system fields to get the 1 2 3 .

Can you please explain that whatyou want in your layout?

rulohx87
Contributor III
Contributor III
Author

I just solve the problem. This is my solution:

=IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_1),sum(Vendedor_1),

IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_2),sum(Vendedor_2),

IF(Max(aggr(sum(Ventas),Vendedor)) = sum(Vendedor_3),sum(Vendedor_3))))

Thanks for the reply