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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.