Quick Measures using Averages


#1

Hi Fellow Power BI Users -

Wanted to know your eyes on this its page 5 of the pbix file I have uploaded.
I was testing out the Quick Measures on Averages on Total Sales.

Average Check 1 uses a quick measures, but it brings the exact same value as Total Sales
Average Check 2 is what I wrote out. but still gets same result as total sales?
Can you please advise why these cals are not calculating right even though i’ve used AVERAGEX.
Is it to do with content transition?

3.TopN.pbix (624.3 KB)


#2

Firstly I’m not really a big fan of quick measures. I truly believe it’s still far more important to write out formula and understand exactly how they are operating.

Quick measures can give you ideas on what you may need, but having a deep understanding of how each part of formulas are operating is absolutely crucial under all circumstances.

Average check one and two looks exactly the same to me and they are both the same as total sales, except for the total which looks correct to me.

You have to look deeper at what is happening for each individual result.

This is also my problem with quick measures…you don’t even need two functions included here.

Average Check 1 = 
AVERAGEX(
	KEEPFILTERS(VALUES('Customer'[Customer Names])),
	CALCULATE([Total Sales])
)

You get exactly the same results using this.

Average Check 2 = 
AVERAGEX( 
    VALUES(Customer[Customer Names]),
        [Total Sales] )

There’s is really no difference but this second one is way simpler to understand.

Also wrapping a measure with a CALCULATE function is pointless as the measure already does that by default. This is what is referred to as context transition.

The only difference to total sales is in the totals as it should be.

That’s because within AVERAGEX you have VALUES( Customer names ),

Hopefully this clears things up.