Forum Discussion
Wrong total column
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?
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?
- OpenDataLab9 years agoHelper II
You need to use a SUMX calculation in order to get to the result you are looking for.
I have put a workbook togather with all the calculations you need: https://1drv.ms/u/s!AnKdZAdhTr78dKvMfL9WlrvogE8
- Anonymous9 years agoNot applicable
OpenDataLab, thanks it worked. But, I though it would work for my real table. I purposely hid two others columns =(
Look, at my real data here.
I have two more columns, one named NATUREZA and other named EMISSAO. The EMISSAO column is a date and the NATUREZA column containg some text values.
On the example that gives 21.57 as a grand total, I have the following filters:
One page filter with NATUREZA ( look at the NATUREZA's values, I've edited it to be easy), just check the string values that contains USE_1, USE_2, USE_3 and USE_4 on the page filter.
And finally I created a slicer with the values of EMISSAO, the values are: Year = 2017, Month = 6 and Days = 1 to 19.
Can you help me to create the right measuere? I've already tried to use ALLEXCEPT, but it did not works....
Thanks.