Sorry for a poor description, essentially in the scenario the granularity of an average was changed by iterating over the linked date table;
So to start you have ;
Fine, but do change the granularity this then becomes
But the total revenue measure is ;
So my question , at last is how can I incorrporate the abvoe code into the AVERAGEX formula iterating over the date table and not use the measure,
I've tried various options none of which work,
The clsoeset I've got is
Which I knew wouldn't work but at least gave an answer, it must be possible or it wouldn't work with the measure?
What am I overlooking , getting wrong?
Richard.
So to start you have ;
SQL:
Average M:=AVERAGEX(fTransactions,[Total Revenue Iterate Over Fact])
Fine, but do change the granularity this then becomes
VBA Code:
AVERAGEX(VALUES(dDate[Year Month]),[Total Revenue Iterate Over Fact])
But the total revenue measure is ;
Excel Formula:
Total Revenue Iterate Over Fact:=SUMX(fTransactions,fTransactions[UnitsSold]*RELATED(dProduct[RetailPrice]))
So my question , at last is how can I incorrporate the abvoe code into the AVERAGEX formula iterating over the date table and not use the measure,
I've tried various options none of which work,
VBA Code:
AVERAGEX( VALUES(dDate[Year Month]),CALCULATE(SUM(fTransactions[UnitsSold])*dProduct[RetailPrice]))
The clsoeset I've got is
VBA Code:
AVERAGEX( VALUES(dDate[Year Month]),SUMX(fTransactions,fTransactions[UnitsSold]*RELATED(dProduct[RetailPrice])))
Which I knew wouldn't work but at least gave an answer, it must be possible or it wouldn't work with the measure?
What am I overlooking , getting wrong?
Richard.