Forum Discussion

informer's avatar
informer
Icon for Helper I rankHelper I
1 year ago
Solved

DAX - AVERAGEX behaviour incomprehensible !

Hi,   2 tables  Sales rows (please don't focus on values of transaction_id, no consequences on my question) Calandar   I calculated  Turnover = SUMX('Sales rows', 'Sales rows'[quantity_sold] ...
  • Irwan's avatar
    1 year ago

    hello informer 

     

    please check if this accomodate your need.

     

     
    i am not sure the result doesnt match to what you state above.

    Based on your sample data above,

    1-Jan should be 3 as (2*2+1*2)/2

    2-Jan should be 126 (8*3+6*9+20*15)/3

     

    create a measure with following DAX.

    Average =
    AVERAGEX(
        'Table',
        'Table'[quantity_sold]*'Table'[unit_price]
    )
     
    Hope this will help.
    Thank you.