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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
elliechasebrown
Regular Visitor

How find the sum of grouped data?

I am having trouble creating measures from grouped data.

 

These company names repeat throughout the dataset I have:

elliechasebrown_2-1721855787381.png

So I grouped them together. (I also have a separate table where I used the "distinct" function to get the exact result of the "group by" but it removed connection to the original table).

 

elliechasebrown_1-1721855720445.png

What measure/calculated column do I need to use to find the sum of the all the rows associated with each group? 

 

elliechasebrown_3-1721855917237.png

 

Example: What measure would I need to use to find that the Chobani sum was 500, using my grouped company names? 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@elliechasebrown 

Regarding the issue you raised, my solution is as follows:

1.First, you can try to check if the data type of your numeric column is numeric instead of text type:

vlinyulumsft_0-1722419421644.png

2.Secondly, you can try to add custom columns in powerquery:

vlinyulumsft_1-1722419421648.png

vlinyulumsft_2-1722419780342.png
3.Then, make sure in the aggregation method is sum:

vlinyulumsft_3-1722419780343.png

4.Then use the matrix view,this way you can sort the aggregation by group.:

vlinyulumsft_4-1722419794592.png

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

5 REPLIES 5
elliechasebrown
Regular Visitor

Thank you for your response!  

 

I grouped a lot of the "project names" because a lot of them had different spelling but were still apart of the same project. I didn't want to go back into the whole spreadsheet and fix every project name error so that they would all match:

 

elliechasebrown_0-1722365143300.png

Like all of these Chobani rows are the same project but how would power bi know that if I didn't group them?

 

I tried creating a measure (sum function) of the number column and applying it but I got an error message:

elliechasebrown_1-1722365257482.png

 

For example:

elliechasebrown_1-1722371145546.png

On the left I have UNGROUPED projects. On the right I have them all grouped together. 

 

When I click on the Chobani group I have on the right, this is what pops up on the left:

elliechasebrown_2-1722371224188.png

How can I get the Chobani group "Total" to actually total? 

I tried creating a SUM measure of the fee totals and it gives me an error message.

 

Anonymous
Not applicable

Hi,@elliechasebrown 

Regarding the issue you raised, my solution is as follows:

1.First, you can try to check if the data type of your numeric column is numeric instead of text type:

vlinyulumsft_0-1722419421644.png

2.Secondly, you can try to add custom columns in powerquery:

vlinyulumsft_1-1722419421648.png

vlinyulumsft_2-1722419780342.png
3.Then, make sure in the aggregation method is sum:

vlinyulumsft_3-1722419780343.png

4.Then use the matrix view,this way you can sort the aggregation by group.:

vlinyulumsft_4-1722419794592.png

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

It was the data type! I changed it to numeric decimal and the SUM of that column finally showed up. THANK YOU!

elliechasebrown_0-1722443230812.png

 

PhilipTreacy
Super User
Super User

Hi @elliechasebrown 

 

Download example PBIX file

 

This calculation is in-built in Power BI.  You don't need to group the data first, all you need to do is add a Table visual then add the Project Name and Value and you should get this.  The default aggregation for the value field is SUM

 

PhilipTreacy_0-1721863609958.png

 

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors