This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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 therefore 4.27% cash in the portfolio. I need to divide each country weight by 0.9753 so that the country weight sums to 100%. How can I write a new measure to calculate that?
Solved! Go to Solution.
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 / ?
Try this pattern
Total=calculate(sum(table[weight]),all(table[country]))
new percent = divide(sum(table[weight]),[Total])
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 / ?
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.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 23 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 27 | |
| 22 | |
| 22 |