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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.