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, 2020 in Power BI by Rajiv
• 8,910 points
3,935 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, 2020 by Gitika
• 65,890 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
• 7,060 points
5,990 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,490 points
1,824 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
• 52,360 points
4,872 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, 2020 in Power BI by Alisha
6,169 views
0 votes
1 answer

How do I count rows in one table based on values in another table using DAX?

If the tables are related, this is ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,890 points
22,450 views
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, 2020 in Power BI by Gitika
• 65,890 points
6,727 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, 2020 in Power BI by Gitika
• 65,890 points
844 views
0 votes
1 answer

DAX / PowerPivot query functions to spread aggregated values over time period

The solution below assumes a table called ...READ MORE

answered Oct 5, 2020 in Power BI by Gitika
• 65,890 points
1,206 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP