If you can post a sample packaged workbook (.twbx) example, I'd be happy to look over your work. Its very difficult to know whats going on without seeing the actual data/workbook.
The reason you are getting this is that the % values have been rounded to two decimal places. The raw % values are actually different (like 9.4281.... and 9.8096....) and when the raw values are divided, the result is what you are seeing.
Thanks Matthew, sorry for my silly question!
Here's a version where I've explicitly rounded your percentage calc--I also changed your calculation to be:
Which is what you really wanted, I believe. WIth the % field explicitly rounded to 2 decimal places (actually 4, since we're dealing with a decimal/percentage value here), the calculation will result in 4.03% as you expected. Example attached.
But you were getting the correct results before--4.05% is actually the accurate number based on the raw values in your data.
I don't understand very well what's the difference between a measure defined as
The second one, how it could be referred to a single row, instead of a partition?
if you have row level data, sum(i)/sum(s) is same as [i]/[s]. But when you aggregate your data, sum(i)/sum(s) will first count sum(i) and sum(s) and after that divide sum(i) with sum(s). So you will get weighted average.
If you use [i]/[s] and aggregate your data, it will just sum those [i]/[s] together from each row. If you select avg instead of sum, you will get average of averages.