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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Group by Aggregate

Hi everyone 

I am required to have a group by total in my report.

There are several rows of same supplier with different invoices total, I want to group all rows into one row and show the sum of invoices in that row.  For example see the picture. I want the G.Total 47682 to be shown against Supplier Name "Seven Star" in a single row, and not the way it looks like below. I am using Direct query in my report .Can someone help me ? 

Best wishes 

 

Data_Group by.JPG

1 ACCEPTED SOLUTION

You can write measure like below:-

Measure_LT_125 = if(sum(total amount)<125000,sum(total amount))
Measure_GT_700 = if(sum(total amount)>700000,sum(total amount))
Measure_BT = if(AND(sum(total amount)>125000,sum(total amount)<700000),sum(total amount))

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

6 REPLIES 6
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

There are two ways to do it:-

1. You can create a two measure like below and use it on table visual:-

Sum_Total_invoice = Sum(table[Total invoice ])
Sum_Total = Sum(table[Total])

 

2. Or you can directly drag these column on table visual and put summerization as sum for total and total invoice:-

Samarth_18_0-1639729128034.png

 

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

Anonymous
Not applicable

Hi @Samarth

Thankyou for tips. Can you also tell how to create measure like less than <125k, greater than >700 k and between 125k-700k .. As you can see below, i created one but it shows amount of 388 883, which is wrong.

it should be all invoices together under 125k...

Data_1.JPG

 Thanks

You can write measure like below:-

Measure_LT_125 = if(sum(total amount)<125000,sum(total amount))
Measure_GT_700 = if(sum(total amount)>700000,sum(total amount))
Measure_BT = if(AND(sum(total amount)>125000,sum(total amount)<700000),sum(total amount))

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

Anonymous
Not applicable

Great. Sometime solution is easier than one think.. Thankyou for solution.

 

Watsky
Solution Sage
Solution Sage

Hey @Anonymous ,

If your example isn't what you want it to look like, then can you show us what you want the results to look like?


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Anonymous
Not applicable

Hi Watsky

Thankyou for correction. Here is a new example how i want it to be look like  

Explanation ::: Sevenstar has many rows, I want it to be groupped in one row and show the total invoices and total .

Data_Group by.JPG

Best regards

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.