Forum Discussion

cworkman2015's avatar
cworkman2015
Icon for Helper II rankHelper II
6 years ago
Solved

Calculating Total Average ignoring visuals dimensions

Hello,


I'm trying to calculate the total average of sales units across a dimension in a matrix. Here is my current formula: 

 
Sales Avg Sum = averagex(ALL('Reports DM_STORE'[Store Number]),[Sales Units])
The formula is returning the correct value in the Total line, but I'd like that Total value to be across every record in the the visual.
example Store 25, 24, 16, etc. all have a Sales Avg Sum of 29,094.64
 
Any help would be appreciated!
 

  • Hi cworkman2015 

     

    Try the below

    Sales Avg Sum = 
    AVERAGEX( 
        ALL( 'Reports DM_STORE'[Store Number], 'Reports DM_STORE'[Store] ), -- OR ALL( 'Reports DM_STORE' ) 
        [Sales Units] 
    )
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski



    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski

     

2 Replies

  • kentyler's avatar
    kentyler
    Icon for Solution Sage rankSolution Sage

    Have you tried just 

    Sales Avg Sum = average('Reports DM_STORE'[Sales Units])

    That should average all the numbers of Sales Units. 

  • Mariusz's avatar
    Mariusz
    Icon for Community Champion rankCommunity Champion

    Hi cworkman2015 

     

    Try the below

    Sales Avg Sum = 
    AVERAGEX( 
        ALL( 'Reports DM_STORE'[Store Number], 'Reports DM_STORE'[Store] ), -- OR ALL( 'Reports DM_STORE' ) 
        [Sales Units] 
    )
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski



    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski