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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Average month calculation

I want to calculate the average units per month.  The formula I have is

Measure = AVERAGEX(VALUES(Dates[Month], 'Shipped Sales Detail'[Units]))

 

I get the error message "too many arguments were passed to the VALUES function.  The maximum argument count for the function is 1.  Can someone assist?  Thank you!

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please update the formula of Measure as below, the part with red font is updated one...

Measusre = AVERAGEX ( VALUES ( Dates[Month] ), 'Shipped Sales Detail'[Units] )

If the above one can't help you get your expected result, please provide some sample data(exclude sensitive data) and your expected result with backend logic and special examples. Thank you.

Best Regards

Community Support Team _ Rena
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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please update the formula of Measure as below, the part with red font is updated one...

Measusre = AVERAGEX ( VALUES ( Dates[Month] ), 'Shipped Sales Detail'[Units] )

If the above one can't help you get your expected result, please provide some sample data(exclude sensitive data) and your expected result with backend logic and special examples. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
VahidDM
Super User
Super User

Hi @Anonymous 

 

It because of ), try this:

Measure = AVERAGEX(VALUES(Dates[Month]), 'Shipped Sales Detail'[Units]))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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