Forum Discussion
Thasos
3 years agoRegular Visitor
Calculate average based on two columns
Hi guys,
I've recently discovered Power BI and I love the possibilities. I've come a long way with Youtube tutorials and this forum (it's truly amazing :)) However, I've run into an error to which I have not been able to find a solution. And I've already burned a lot of hours to find a solution..
The problem is as follows: the column '%decl. tov gewerkt' is based on the column 'Declarabel' devided by 'Uren gewerkt'. The total value in the column '%decl. tov gewerkt' is the average of the numbers in the column. However, it should be the average of the total value of 'Declarabel' divided by the total value of 'Uren gewerkt'.
Or, to use some numbers: The table below calculates the total value of '%Decl. tov gewerkt' as an average of the numbers above, resulting in a 65.86%. Yet is should be 50 (total value of 'Declarabel') by 72,75 (total value of 'Uren gewerkt') = 68,73%.
Can anyone maybe show me where I'm going wrong?
I've included a sample of the data I am working with here: Test file
You can create a measure like
% average = DIVIDE( SUM( Blad1[Declarabel]), SUM( Blad1[uren gewerkt] ) )