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: