Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sandman153
Regular Visitor

Avg Subtotal

Hi 

 

I have a visual with a matrix and am trying to get the subtotals as an average rather than a sum. How would I go about doing this?

 

Is this feasible?


Thanks

Sarath

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, you can use "average per category" quick measure, to learn about "quick measures" check here.

 

In the example, with the quick measure i get "average of sales monthly" instead of the "sum of sales":

 

The code of the "quick measure" is:

 

SALES average per DATE =
AVERAGEX(
    KEEPFILTERS(VALUES('Table'[DATE])),
    CALCULATE(SUM('Table'[SALES]))
)



sales.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, you can use "average per category" quick measure, to learn about "quick measures" check here.

 

In the example, with the quick measure i get "average of sales monthly" instead of the "sum of sales":

 

The code of the "quick measure" is:

 

SALES average per DATE =
AVERAGEX(
    KEEPFILTERS(VALUES('Table'[DATE])),
    CALCULATE(SUM('Table'[SALES]))
)



sales.png

 

Thank you Maguilar. This helped me achieve Average value in column subtotals. 

Thanks Maguilar

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.