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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JNelson
Helper II
Helper II

Summarising rows based on other columns

Hello!

 

I need to summarise one of my columns [Qty] based on the other columns in the table.

If Tr and Type are blank, and if Date and Job No are the same, I need the Qty to sum and the populated Tr and Type to align with the summed amount, producing one single row for that entry.

 

Is this possible?

 

JNelson_0-1709597651723.png

 

Thank you!

1 ACCEPTED SOLUTION

@JNelson 

pls see the attachment 

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
ryan_mayu
Super User
Super User

@JNelson 

you can do this in pq, here is a workaround for you . pls see the attahment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for your reply. I don't really know how to apply this to my current data set/tables. Do you have any commentary that explains what is happening?

Thanks

separate the table, one includes the data without null type. another includes the data with null type. 

Then group by the second table. At last, combine two tables





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for your efforts, but when I put the whole data set in (not just the sample you took) it doesn't work. There are some jobs that are taking the number out of the tr column and that looks to be effecting the Qty column. Or there are times when it's taking the number out of the tr column but it's not effecting the Qty. Perhaps it's to do with the job numbers?

 

JNelson_0-1709681918809.png

JNelson_1-1709681980330.png

 

Thanks 🙂

 

pls paste the sample data ,not the screenshot.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

Below is the data table 

Thanks

 

DateJob NoQtyTrType
27/02/20247KE0E11673180Trucking
27/02/20247KE0P33233100Trucking
27/02/20247KLC413380180Profiling
27/02/20247KLC414 60Asph
27/02/20247KLC4141212Twn Pro
28/02/20247KE0351535  
28/02/20247KE0351410220LB
28/02/20247KE0376 1LB
28/02/20247KE0376351Twn Pro
28/02/20247KE0377205150Pro
28/02/20247KE0377183  
28/02/20247KE0E11531LB
28/02/20247KE0E11101Twn
28/02/20247KLC413382180Profiling
28/02/20247KLC4143860Trucking
28/02/20247KLC4141062Twn Pro
29/02/202462750351Twn
29/02/20247KE0351570  
29/02/20247KE0351280220LB
29/02/20247KE0377274  
29/02/20247KE0377198180Profiling
29/02/20247KE0P34148  
29/02/20247KE0P34200100Trucking
29/02/20247KL0G65372125Tan
29/02/20247KLC413380180Profiling
1/03/20247KE0351200100LB
1/03/20247KE0351130  
1/03/20247KE0P34180100Trucking

@JNelson 

pls see the attachment 

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Amazing! Thank you so much 🙂

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors