Forum Discussion
informer
Helper I
1 year agoDAX - 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] ...
- 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.
Irwan
Super User
1 year agohello 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.
Thank you.