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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
RatanaPOUY
Frequent Visitor

Sum distinct base on column

hi,

 

i have a detail table as follow:

Table name: Daily Transaction

Tbl1.png

then create a new table to distinct delivery number

Delivery Order = DISTINCT('Daily Transaction'[Delivery])


Tbl2.png

the problem is formula of sum Volume doesn't work.

CALCULATE(SUMX('Daily Transaction','Daily Transaction'[Volume]))

 

Thanks,

Ratana

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @RatanaPOUY ,

 

You may create measure like DAX below.

 

Sum Volume= CALCULATE(SUM('Daily Transaction'[Volume]),FILTER(ALLSELECTED('Daily Transaction'), 'Daily Transaction'[Delivery] =MAX('Daily Transaction'[Delivery])))

 

Or you can just change the show aggregation of Volume to Sum.

 

55.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

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

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @RatanaPOUY  ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @RatanaPOUY ,

 

You may create measure like DAX below.

 

Sum Volume= CALCULATE(SUM('Daily Transaction'[Volume]),FILTER(ALLSELECTED('Daily Transaction'), 'Daily Transaction'[Delivery] =MAX('Daily Transaction'[Delivery])))

 

Or you can just change the show aggregation of Volume to Sum.

 

55.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

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

Anonymous
Not applicable

I'm not sure what is the purpose of the new table, but if you only require to achieve the result of summing the Volumn column based on Delivery, then you can access  "Edit Query", duplicate the original Table, Go to Transform tab, and then click on the Group By function, this will show a dialog in which you will chose the parameters of groupings and the aggregation you need.

 

however, if the purpose is only to show the results in a visual, then this can be achieve by simple aggregation on the visual itself.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.