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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ITMSPMAN
New Member

Summarise on multiple columns

Is there a way that I can merge the values based on multiple columns?

 

My table is below with the layout of the data.

 

What I want to happen is if the Client, Item number, the description and the price is the same then it would sum the quantity and merge them all into one row.

 

DateClientItem NumberDescriptionPriceQuantityInvoice No.
14/01/2022John Doe04_102_0136_6_1_TGroup Activities59.8816370
14/01/2022John Doe04_102_0136_6_1_TGroup Activities59.882.56370
14/01/2022John Doe04_102_0136_6_1_TGroup Activities59.883.336370
14/01/2022John Doe04_104_0125_6_1_TGrp Non Face to Face59.671.56370
14/01/2022John Doe04_599_0136_6_1Community Groups2.171.676370
14/01/2022John Doe04_599_0136_6_1Community Groups2.172.56370
14/01/2022John Doe04_599_0136_6_1Community Groups2.1746370
14/01/2022John Doe04_599_0136_6_1Group Activities2.1716370
14/01/2022John Doe04_599_0136_6_1Group Activities2.172.56370
14/01/2022John Doe04_599_0136_6_1Group Activities2.173.336370
       
       
       
       
       
       
       
1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @ITMSPMAN ,

 

If you add your Client, Item number, the description and the price columns on your visual and  mark price column summerized as sum then it will give you expected output.

Samarth_18_0-1648359373100.png

Or if you want to do it explicitly then you can use below measure:-

Measure = sumx(SUMMARIZE('Table','Table'[Item Number],'Table'[Client],'Table'[Description],"Sum",CALCULATE(SUM('Table'[Price]))),[Sum])

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
Samarth_18
Community Champion
Community Champion

Hi @ITMSPMAN ,

 

If you add your Client, Item number, the description and the price columns on your visual and  mark price column summerized as sum then it will give you expected output.

Samarth_18_0-1648359373100.png

Or if you want to do it explicitly then you can use below measure:-

Measure = sumx(SUMMARIZE('Table','Table'[Item Number],'Table'[Client],'Table'[Description],"Sum",CALCULATE(SUM('Table'[Price]))),[Sum])

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

I figured out why I couldn't get it working, I had the quantity field as a text so it wasn't summarising.

 

I have it all working now, thankyou for pointing me in the right direction.

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