Forum Discussion
zirael
3 years agoRegular Visitor
DAX Measure for Revenue average by Order
Hi, I have a fact table like the one below. I need to create a measure calculating the average value of order (OrderKey) OrderNumber CustomerCountry OrderType ProductNumber SalesQuanti...
- 3 years ago
try this:
Avg Order Revenue = AVERAGEX ( DISTINCT ( 'Table'[OrderKey] ), CALCULATE ( SUM ( 'Table'[SalesRevenue] ) ) ) - Anonymous3 years ago
Hi zirael ,
Please have a try.
Create a measure.
ave_measure = AVERAGEX ( FILTER ( ALL ( 'Table' ), 'Table'[OrderNumber] = SELECTEDVALUE ( 'Table'[OrderNumber] ) ), 'Table'[SalesRevenue] )Or a column.
ave = AVERAGEX ( FILTER ( 'Table', 'Table'[OrderNumber] = EARLIER ( 'Table'[OrderNumber] ) ), 'Table'[SalesRevenue] )If I have misunderstood your meaning, please provide more details with your desired output.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi zirael ,
Please have a try.
Create a measure.
ave_measure =
AVERAGEX (
FILTER (
ALL ( 'Table' ),
'Table'[OrderNumber] = SELECTEDVALUE ( 'Table'[OrderNumber] )
),
'Table'[SalesRevenue]
)
Or a column.
ave =
AVERAGEX (
FILTER ( 'Table', 'Table'[OrderNumber] = EARLIER ( 'Table'[OrderNumber] ) ),
'Table'[SalesRevenue]
)
If I have misunderstood your meaning, please provide more details with your desired output.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.