cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtrevisiol
Helper III
Helper III

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.

View solution in original post

PaulDBrown
Super User
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.