Forum Discussion
Anonymous
9 years agoNot applicable
Calculated measure
I need to calculate a new measure which allows me to calculate the weight to each country excluding the cash weight. In the example above the country allocation is 95.73% and there is the...
- Anonymous9 years ago
Superb! I'm never going to admit how long that took!!! I now have to understand the use of divide in your example why not use / ?
MattAllington
9 years agoCommunity Champion
Try this pattern
Total=calculate(sum(table[weight]),all(table[country]))
new percent = divide(sum(table[weight]),[Total])
Anonymous
9 years agoNot applicable
Superb! I'm never going to admit how long that took!!! I now have to understand the use of divide in your example why not use / ?
- MattAllington9 years agoCommunity Champion
Divide has an auto "divide by zero error" protection built in. I just use it routinely rather than / even if there is no chance of div 0 errors.