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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors