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

Using Rank with Min(Aggr....)

Hi all,

I have the following probem, when I use the code:

Aggr( NODISTINCT Count({<tipo_domanda_cs={'Origin'} >} count_preventivo), ds_marca_cs, Tempo_Anno,Tempo_Mese, cd_mercato)

I have some rows with null value since there are more values for that row.

Consequently I have to adjust the code in this way:

Max(Aggr( NODISTINCT Count({<tipo_domanda_cs={'Origin'} >} count_preventivo), ds_marca_cs, Tempo_Anno,Tempo_Mese, cd_mercato))

In this way I have all the rows filled correctly but I don't know how to make the rank of it.

I tried:

Aggr( NODISTINCT Rank(Count({<tipo_domanda_cs={'Origin'} >} count_preventivo)), ds_marca_cs, Tempo_Anno,Tempo_Mese, cd_mercato)

but this sintax does,'t work.

Can you help me to find the right sintax for it?

Thank in advance

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I would be a lot easier to do if you posted your application or a small sample...

What's the reason for NODISTINCT- it will cause your AGGR() formula to return multiple results for each combination of the dimensions... I'm not sure how ranking would work in this case.

Also, because you have multiple dimensions in your AGGR(), you may have to specify Rank(TOTAL ...) to ensure that ranking is happening across all dimensions.

Also, please formulate in plain English what is the requirement. What are you trying to accomplish, syntax aside?

cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy and Austin, TX!