Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
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.
@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])))
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.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting
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
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!