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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
selected_
Helper IV
Helper IV

Is that possible to measure AVERAGE three times in a single measure?

I'm trying to make a measure like that, how can I correct it?

 

 

Avg ProductID+OrderID = AVERAGEX(VALUES(Products[ProductID]), CALCULATE(AVERAGE('Order Details'[OrderID]), CALCULATE(AVERAGE(Products, Products[UnitPrice]) * (1-[Total Discount]))))

 

 

ERROR Too many arguments were passed to the AVERAGE function. The maximum argument count for the function is 1.

5 REPLIES 5
v-yingjl
Community Support
Community Support

Hi @selected_ ,

Average() only allows one parameter and AverageX() allow two parameter, they are defined by DAX syntax.

Based on your formula, not certain what you want to calculate and what your expected result is, seems need more information about this issue for further discusssion like some sample data, screen shots etc. which can let community members better to help you to solve this issue.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@selected_ , Try like


Avg ProductID+OrderID = AverageX(Summarize('Order Details','Order Details'[OrderID],Products[ProductID], "_1",CALCULATE(AVERAGE(Products, Products[UnitPrice]) * (1-[Total Discount]))),[_1])


Avg ProductID+OrderID = AVERAGEX(VALUES(Products[ProductID]), CALCULATE(AVERAGE(Products, Products[UnitPrice]) * (1-[Total Discount]) Values('Order Details'[OrderID])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
edhans
Super User
Super User

Use this measure @selected_ 

Avg ProductID+OrderID =
AVERAGEX(
    VALUES( Products[ProductID] ),
    CALCULATE(
        AVERAGE( 'Order Details'[OrderID] ),
        CALCULATE(
            AVERAGE( Products[UnitPrice] ) * ( 1 - [Total Discount] )
        )
    )
)

You had this:

AVERAGE(Products, Products[UnitPrice])

You cannot do that, and it was complaining about the two parameters, and AVERAGE() only takes one, a single column. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@edhans 

 

your code give me error

A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

Yeah, I have no data to test with @selected_ and I am not sure what your formula is even doing. Why is it averaging the order ID for example? 

I just gave you something syntactically correct. Please provide data and what your goal is.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.

Top Solution Authors
Top Kudoed Authors