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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Max index by max average in map

Hi

I want the 'max' of my map to be dynamic, according to the measure chosen.

I have a variable for the measures (var1).

The measure in the map is 'average var1 per user',  done like this:

sum($(var1))/sum(all_users)

until here all is good.

but now, I want the maximum value of the map's legend to be the value of the max 'average var1 per user' country (in order for the color ratio to make sense).

I tried something like:

max(sum(<country> $(var1))/sum(<country> all_users))

but it's not working..

Thanks in advance

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you need the <country> prefix within an AGGR()

Max(Aggr(Sum($(var1))/Sum(all_users), country))


cheers,

Oleg Troyansky

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

Ask me about Qlik Sense Expert Class!

View solution in original post

3 Replies
sunny_talwar

May be this:

Max(Aggr(Sum(<country> $(var1))/Sum(<country> all_users), country))

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you need the <country> prefix within an AGGR()

Max(Aggr(Sum($(var1))/Sum(all_users), country))


cheers,

Oleg Troyansky

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

Ask me about Qlik Sense Expert Class!
sunny_talwar

I failed to notice missing curly parenthesis, I thought it was there for ignoring selections in Country field.