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: 
Strwbryshwty
Partner - Contributor
Partner - Contributor

Calculate %

I am adding a tooltip to my map visual. How do I calculate the % amount each country holds for its region? I have to use total and aggr function. 

Labels (1)
1 Reply
pedrohenriqueperna
Creator III
Creator III

Hi,

There's not much information in your request, it'd depend on your data model, but yes, it's usually done by using "total".

 

For instance:

Sum({<country = {'Brazil'}>} value)

/

Sum(Total value)

 

If you have a field for the region, let's say, america, you could divide by the region like:

 

Sum({<country = {'Brazil'}>} value)

/

Sum({<region = {'South America'}>})

 

If you have a dimension plotted, let's say, in a table, then you obviously won't have to set analysis the country and the dimension will do that for you, so you simple divide by the total:

 

Sum(value)

/

Sum(Total value)

 

Hope this helps.