Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 crazy! 😉
In my table, I replaced all zeros with Null so it calculates the rows correctly.
Solved! Go to Solution.
Hi @ffunky ,
Please refer to this measure.
Average Qty = AVERAGEX(SALES_WEEKLY,CALCULATE(SUM(SALES_WEEKLY[Null_Qty])))
Best regards,
Yuliana Gu
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]))
)
Hi @ffunky ,
Please refer to this measure.
Average Qty = AVERAGEX(SALES_WEEKLY,CALCULATE(SUM(SALES_WEEKLY[Null_Qty])))
Best regards,
Yuliana Gu
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])
Hi!
you need to use "average per category" quick measure, enter to this link for see a example: AVERAGE SUBTOTAL.
That gets my column totals corrected, but the row totals and grand totals are off now.
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]))
)Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 41 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 110 | |
| 91 | |
| 55 | |
| 45 |