Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Total sum average for measure

Hi guys,

 

i have a measure doing this:

 

CALCULATE
SUMX('DIO Calculation';SUMX('DIO Calculation';'DIO Calculation'[First Order Stock after 6 M])/'DIO Calculation'[Sales per day])
 

That basically gives me this Column:

 
Now within the rows everything works fine. But in the last row - the total row - the measure sums up everything. I want it to build an average or even weighted average. 
Does somebody know how to do that?
 
Thx!
  • Hi, Anonymous 

     

    Based on your description, I created data to reproduce your scenario.

    DIO Caculation:

     

    You may create a measure as below.

     

    Result = 
    AVERAGEX(
        'DIO Calculation',
        'DIO Calculation'[First Order Stock after 6 M]/
        'DIO Calculation'[Sales per day]
    )

     

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Anonymous ,

    Try like

    divide(sum('DIO Calculation'[First Order Stock after 6 M]),sum('DIO Calculation'[Sales per day]))

  • v-alq-msft's avatar
    v-alq-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

     

    Based on your description, I created data to reproduce your scenario.

    DIO Caculation:

     

    You may create a measure as below.

     

    Result = 
    AVERAGEX(
        'DIO Calculation',
        'DIO Calculation'[First Order Stock after 6 M]/
        'DIO Calculation'[Sales per day]
    )

     

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.