Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
zirael
Regular 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)

 

OrderNumberCustomerCountryOrderTypeProductNumberSalesQuantitySalesRevenueOrderKey
1USXXxc13535642,5401USXX
1USXXvf453542,5761USXX
1USXXhg35634445,5621USXX
1USXXkj78981212,3541USXX
2UKKYvf4535127,7282UKKY
2UKKYhg3563123127,3672UKKY
2UKKYkj78983536,0332UKKY

 

Would you help?

2 ACCEPTED SOLUTIONS
Stachu
Community Champion
Community Champion

try this:

Avg Order Revenue = 
AVERAGEX (
    DISTINCT ( 'Table'[OrderKey] ),
    CALCULATE ( SUM ( 'Table'[SalesRevenue] ) )
)

20221017_avg.PNG



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

Anonymous
Not 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]
)

 

vpollymsft_0-1666070399616.png

 

 

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.

View solution in original post

2 REPLIES 2
Anonymous
Not 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]
)

 

vpollymsft_0-1666070399616.png

 

 

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.

Stachu
Community Champion
Community Champion

try this:

Avg Order Revenue = 
AVERAGEX (
    DISTINCT ( 'Table'[OrderKey] ),
    CALCULATE ( SUM ( 'Table'[SalesRevenue] ) )
)

20221017_avg.PNG



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.