Forum Discussion
column total average vs row total
- 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])
Much closer now - but - I can't make it not include the null values in the calculation. For instance, store 1474 should be 1.5, not 0.3. Any ideas out there?
no ideas? I'm still racking my brain on this one... I'm at the point where bribery could be considered. ;)
This appears to be most accurate and colum totals at bottom are correct, but the total column needs to average the row, not sum them.
Null_Qty average per UPC_CD =
AVERAGEX(
KEEPFILTERS(VALUES('SALES_WEEKLY'[STORE_NBR])),
CALCULATE(SUM('SALES_WEEKLY'[Null_Qty]))
)
- v-yulgu-msft7 years agoMicrosoft Employee
Hi ffunky ,
Please refer to this measure.
Average Qty = AVERAGEX(SALES_WEEKLY,CALCULATE(SUM(SALES_WEEKLY[Null_Qty])))
Best regards,
Yuliana Gu
- ffunky7 years agoHelper I
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])