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
asanteza
Regular Visitor

Too few arguments were passed to the SUMMARIZE function. The minimum argument count for the function

How should I modify the function below to avoid the error message.

Measure = SUMMARIZE(GROUPBY(Productivity, Productivity[employee name], "AvgOfgrade", AVERAGE(Productivity[grade awarded])))
13 REPLIES 13
tamerj1
Super User
Super User

Hi @asanteza 

Can you please present sample of the shape of the expected results?

v-yiruan-msft
Community Support
Community Support

Hi @asanteza ,

When you use the function SUMMARIZE, it will return a table instead of a value. You can get more detail about the function SUMMARIZE in this official documentation. You can update the formula of measure as below and check if it can return your expected result... Please find the details in the attachment.

Measure = 
VAR _tab =
    SUMMARIZE (
        Productivity,
        Productivity[employee name],
        "AvgOfgrade",
            CALCULATE (
                AVERAGE ( Productivity[grade awarded] ),
                Productivity[employee name] = EARLIER ( Productivity[employee name] )
            )
    )
RETURN
    AVERAGEX ( _tab, [AvgOfgrade] )

yingyinr_0-1674029426123.png

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

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.

Error: The syntax for 'RETURN' is incorrect.

So sorry for the bother.

Hi @asanteza ,

It seems that you got some error message when you used the formula which I provided... Could you please provide some raw data in your tables (exclude sensitive data) with Text format, the screenshot with the error message and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

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.
FreemanZ
Super User
Super User

hi @asanteza

 try like:

Measure = 
SUMMARIZE(
        Productivity, 
        Productivity[employee name], 
        "AvgOfgrade", 
        CALCULATE(AVERAGE(Productivity[grade awarded]))
    )

 

Error: 

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

Got the error:

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

hi  @asanteza

are you expecting something like this:

 

Measure = AVERAGEX( VALUES(Productivity[employee name]), Productivity[grade awarded] ) 

 

if not, could you describe your expectation on the measure?

 

error:

A single value for column 'grade awarded' in table 'Productivity' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

hi @asanteza 

try like:

Measure = AVERAGEX( VALUES(Productivity[employee name]), SUM(Productivity[grade awarded]) ) 

 

please consider @someone, if you seek further suggestions. 

No error returned but does not list any names of employees.

Jihwan_Kim
Super User
Super User

Hi,

I am not 100% sure if the below DAX formula can provide the desired output of the calucaluted table, but please try something like below.

 

DAX sample =
SUMMARIZE (
    GROUPBY ( Productivity, Productivity[employee name] ),
    "AvgOfgrade", AVERAGE ( Productivity[grade awarded] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


No error but does not return employee name. Please modify it to also show employee name.

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.

Top Solution Authors