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
etane
Helper V
Helper V

Monthly Average Orders per Customer in Totals in Matrix Table

Hello.

 

I have a matrix table with Orders per Customer by month below:

etane_0-1752275407630.png

I want to be able to show the average instead of the total in the colum total but not in the row total.  Not sure whether this is possible.  Below is the desired result which is Orders per Customer divided by Month(today()):

etane_1-1752275591378.png  

 

Please help.  Link to WIP file here: Link

 

Thanks!

2 ACCEPTED SOLUTIONS
FBergamaschi
Solution Sage
Solution Sage

Create a new measure like this

 

New measure=

IF ( ISINSCOPE( 'Calendar'[Year Month] ), [Orders per Customer],[Orders per Customer AVG] )

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

View solution in original post

MasonMA
Community Champion
Community Champion

@etane 

 

Hi, your MONTH(TODAY()) returns the current month number and It assumes that the number of months in your matrix equals the current month. What if there are filtered months? 

 

I would use, 

Orders per Customer AVG = 
VAR MonthCount =
    CALCULATE(
        DISTINCTCOUNT('Calendar'[Year Month]),
        REMOVEFILTERS('Customer Table'[New or Existing])
    )
RETURN
    DIVIDE([Orders per Customer], MonthCount)

and 

OrdersPerCustomer_Adj = 
IF(
    ISINSCOPE('Calendar'[Year Month]),
    [Orders per Customer],
    [Orders per Customer AVG]
)

Your 'Orders per Customer AVG' as below:

MasonMA_0-1752334742409.png

 

and Orders Per Customer:

MasonMA_1-1752331107825.png

 

View solution in original post

12 REPLIES 12
sanalytics
Super User
Super User

@etane You want to show average in column total not in row total.. Like below ?

sanalytics_0-1752333296007.png

Attached is the pbix file for your reference.

Regards,

sanalytics

Hi @sanalytics .

 

Very close.  I am hoping the entire Column Total shows average instead of sum (including the .35 as below):

etane_0-1752509413463.png

 

sanalytics version =
IF ( ISINSCOPE( 'Calendar'[Year Month] ), [Orders per Customer],[Orders per Customer AVG] )
 
If you use this code, it works (already sent yesterday, here again for convenience)
 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

@FBergamaschi This should work if the user is not considering replacing the Month Count part. 

MasonMA
Community Champion
Community Champion

@etane 

 

Hi, your MONTH(TODAY()) returns the current month number and It assumes that the number of months in your matrix equals the current month. What if there are filtered months? 

 

I would use, 

Orders per Customer AVG = 
VAR MonthCount =
    CALCULATE(
        DISTINCTCOUNT('Calendar'[Year Month]),
        REMOVEFILTERS('Customer Table'[New or Existing])
    )
RETURN
    DIVIDE([Orders per Customer], MonthCount)

and 

OrdersPerCustomer_Adj = 
IF(
    ISINSCOPE('Calendar'[Year Month]),
    [Orders per Customer],
    [Orders per Customer AVG]
)

Your 'Orders per Customer AVG' as below:

MasonMA_0-1752334742409.png

 

and Orders Per Customer:

MasonMA_1-1752331107825.png

 

Thanks!  This works.

FBergamaschi
Solution Sage
Solution Sage

Create a new measure like this

 

New measure=

IF ( ISINSCOPE( 'Calendar'[Year Month] ), [Orders per Customer],[Orders per Customer AVG] )

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

@FBergamaschi  Thanks.  Short, simple and works.

Thanks, in this case please mark it as a solution, I think you marked a different post and not mine (maybe your reply to my answer). Not referring to other solutions you accepted (it is OK to accept more than 1), just to the post you marked as a solution

 

Thanks

Yup I clicked the wrong post.  Thanks again for your help.

techies
Super User
Super User

Hi @etane i guess there is no built-in setting to override column totals to show an average while keeping row totals as a sum.

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

@techies yeah at least in excel you can this:

etane_1-1752509636041.png

 

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.