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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mtrevisiol
Helper V
Helper V

Calculated column with the sum by component and ID

Hi everyone.

I've got a table like this

mtrevisiol_2-1626102045677.png

 

My purpose is to create a column with the total sum for each component and for each MoID of the quantity needed for production:

mtrevisiol_3-1626102056371.png

 

What is the correct DAX formula to use? Thank you.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @mtrevisiol 

 

You can also try the column, like this:

Column = SUMX(FILTER('Table',[MoID]=EARLIER('Table'[MoID])&&[Compoent]=EARLIER('Table'[Compoent])),[Qty])

vjaneygmsft_0-1626252889587.png

 

Best Regards

Janey Guo

 

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

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @mtrevisiol 

 

You can also try the column, like this:

Column = SUMX(FILTER('Table',[MoID]=EARLIER('Table'[MoID])&&[Compoent]=EARLIER('Table'[Compoent])),[Qty])

vjaneygmsft_0-1626252889587.png

 

Best Regards

Janey Guo

 

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

PaulDBrown
Community Champion
Community Champion

Try:

TotalComponentQTY = CALCULATE(SUM(Table[Qty]), ALLEXCEPT(Table, Table[MoID], Table[Component]))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors