Forum Discussion
Wrong total column
Hi Anonymous,
Just simulated your calculation in PBI using you data and your measure and my final resulta was 27.824 (image below) breaking down your formula when you are doing the AVERAGE(DADOS[PRAZO_MED]) you make the average of the value multiplied by the %GT so for row 1 you have = 7 * 22,60% = 1,582 but for the total column you have 27.82 (average of the PRAZO_MED) * 100% = 27.824.
Regards,
MFelix
- Anonymous9 years agoNot applicable
MFelix, neither 20.73 or 27.82 are corrects, calculate that sum on excel, you will see that the right sum is 21.57. So, what am I doing wrong to calculate my weighted averege?
- MFelix9 years agoSuper UserHi @caarlos,
You are refering to different results when you use a measure the calculations is.made based on the context of the visual so if you calculate an average value on a row level the total in the end will also be an average and not a sum.of the previous values, that's why in my print I added the Average calculated on the table and not as a measure. If you want to have the average calculated on the lines but on the tital the sum you need to do it in a different way.
Is the data you show all the lines in your table or are this aggregationa on a larger detail?
If it's your table values you can add the average as a column not a measure and then when you add it to your table it will sum the correct value.
Regards,
MFelix- Anonymous9 years agoNot applicable
MFelix, can you exaplain me better what is happening or show me some article about how Power BI calculate the grand total? This is an aggregation of my whole table and you can see this table here. How can I create a measure or a column that the grand total is 21.57?