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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.