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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mtrevisiol
Helper IV
Helper IV

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.