Power BI: calculate the average of measures

When I create a visual table and I put my measures with its corresponding value, enabling the “totals” option will not display the correct result. For instance, I have this table:

power bi

I will create a measure to calculate the percentage for each ticket and I will create the visual table:

power bi

The total line shows 36.54% and this result is not correct because it corresponds to the average of each row or to the sum of all numbers divided by the sum of all total and not the percentage average of the measure:

power bi

To be sure about it, I will extract the table in excel and do the calculation:

power bi

The result is 37.18% so how can I get this same result in Power BI ? I will create another measure with this formula:

AVERAGEX(VALUES('table'[argument]),[measure])

power bi

Alternatively, I can use this formula in which I can put multiple conditions if needed:

AVERAGEX(SUMMARIZE('table','table'[argument],"XXX",[measure]),[measure])

power bi
power bi

The result:

power bi

And to not confuse my audience, I will disable the “totals” option:

power bi

Interesting Topics