Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.