Forum Discussion
ffunky
7 years agoHelper I
column total average vs row total
Hi all, I have rates of sale by week and store, and I'm trying to get the column total to show an average, like the row totals do, but the column seems to only sum up the totals. It's driving me...
- 7 years ago
Hi ffunky ,
Please refer to this measure.
Average Qty = AVERAGEX(SALES_WEEKLY,CALCULATE(SUM(SALES_WEEKLY[Null_Qty])))
Best regards,
Yuliana Gu
- 7 years ago
A collegue here was able to find the solution to this.
Measure = AVERAGEX(
ADDCOLUMNS( SUMMARIZE(SALES_WEEKLY,SALES_WEEKLY[STORE_NBR],SALES_WEEKLY[YR_WK_NBR]),"Test",CALCULATE(SUM(SALES_WEEKLY[Null_Qty]))),[Test])
ffunky
7 years agoHelper I
That gets my column totals corrected, but the row totals and grand totals are off now.
Null_Qty average per STORE_NBR =
AVERAGEX(
KEEPFILTERS(VALUES('SALES_WEEKLY'[STORE_NBR])),
CALCULATE(SUM('SALES_WEEKLY'[Null_Qty]))
)
ffunky
7 years agoHelper I
Sorry - that pic butchered the formatting.
Null_Qty average per STORE_NBR =
AVERAGEX(
KEEPFILTERS(VALUES('SALES_WEEKLY'[STORE_NBR])),
CALCULATE(SUM('SALES_WEEKLY'[Null_Qty]))
)