Error : Function 'GROUPBY' scalar expressions have to be Aggregation functions over CurrentGroup().

0 votes

How to use GROUP BY function in power BI? I tried using the group by DAX function in PowerBI as Measure, New Column, New Table but I get an error invalidating the function

Sep 24 in Power BI by Rajiv
• 3,400 points
51 views

1 answer to this question.

0 votes

The error says you need to use an aggregation function over a group. In your case, you need to use the SUMX aggregation function with the CURRENT GROUP() option. The CURRENT GROUP determines the groups that must be added based on the current row.

Try this out:

New Table = GROUPBY (
        tab1,
        tab1[color],
        "Group by color", SUMX ( CURRENTGROUP (), tab1[count lables] )
    )
answered Sep 24 by Gitika
• 42,520 points

Related Questions In Power BI

+2 votes
2 answers

Power BI service throwing 403 error when using token to embed Power BI report

To add to @Kalgi's answer, Also make ...READ MORE

answered Oct 3, 2018 in Power BI by Nilesh
• 6,980 points
2,006 views
0 votes
1 answer

Power Query Web request results in “CR must be followed by LF” Error

What I think is, it might look ...READ MORE

answered Oct 29, 2018 in Power BI by Shubham
• 13,450 points
508 views
+1 vote
2 answers

403 error thrown by power bi report server when trying to get list of data sets

Hey @saranya, Try removing the header and ...READ MORE

answered Oct 29, 2018 in Power BI by Kalgi
• 51,970 points
720 views
0 votes
1 answer

Error:connecting to Azure SSAS server in Power-BI through Import mode

If I understand correctly, you're connecting to ...READ MORE

answered Nov 9, 2018 in Power BI by Upasana
• 8,620 points
893 views
0 votes
1 answer

How to get month name from month number in Power BI?

You can use: MonthName = FORMAT(DATE(1, [Num], 1), ...READ MORE

answered Sep 24 in Power BI by Alisha
31 views
0 votes
1 answer
0 votes
1 answer

How to ignore a slicer for one measure, but apply it on another?

In order to ignore Slicer you need ...READ MORE

answered Oct 1 in Power BI by Gitika
• 42,520 points
71 views
0 votes
1 answer

How do I use the DAX function ParallelPeriod?

The DAX expression you used in the ...READ MORE

answered Oct 5 in Power BI by Gitika
• 42,520 points
27 views
0 votes
1 answer