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
Anonymous
Not applicable

Sum row values by ID

Hi guys, I have the following situation:

 

12.PNG

What I need to do is, sum the values that have the same ID, put the new value on the same row as it's respective ID, and after this, remove the duplicated ID, in a way that the final product would have no duplicated ID.

 

Can anyone help me with that? Thanks a lot.

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

@Anonymous  ar eyou wanting to do this in query editor or in the visual pane?  because all you ahve to do is create a measure and then it will automtically aggregate it?

 

otherwise alll you need to do in query editor is use the group by under transform and that will aggregrate and give you a new total





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

@Anonymous  ar eyou wanting to do this in query editor or in the visual pane?  because all you ahve to do is create a measure and then it will automtically aggregate it?

 

otherwise alll you need to do in query editor is use the group by under transform and that will aggregrate and give you a new total





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hey @vanessafvg

 

I'm trying to do it on the query editor. I tried grouping as you suggested, but I end up losing all other columns, and some values doesn't add up, like this:

13.PNG

 

Do you have any idea of what I could do to keep the other columns, and why this ID doesn't add up like the others?

@Anonymous it potentially has some white space in it?  i would do a replace   blank space with nothing and see if it helps?

 

change your group by to advanced  and add all the columns you want to keep, but note that they obviously all need to have the same value or it will create more than one row for the combination.

 

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hi @vanessafvg

 

That was it! I trimmed it for blank spaces and was able to fix all errors. Also did the advanced grouping and now everything is correct!

 

Thanks very much!

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