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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Sum by categories (Table)

Hi Folks!

 

I stopped against the next wall, let's see if any good soul can help me!

 

As you can see in the picture, I have a TABLE with the next columns:

- Production Order No_ -> From Table 1

- Sample No_ -> From Table 1

- Cantidad Muestra -> Is a measure, and the original field is in Table 2

 

What I'm trying to do is to sum the field "Cantidad Muestra" by "Sample No_".

 

I have tried the next formula/Measure, without success:

 

Cantidad Muestra TRY = CALCULATE( [Cantidad Muestra]; ALLEXCEPT(Table1;Table1[Sample No_]))

 

The thing is, I need the data to  be shown without using slicers, as shown in the picture.

 

Any ideas?

 

THANK YOU!

 

Example.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Finally found the solution!

 

Cantidad Muestra TRY = CALCULATE( SUM( [Cantidad Muestra]); ALLSELECTED( ); VALUES(Table1[Sample No_]))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Finally found the solution!

 

Cantidad Muestra TRY = CALCULATE( SUM( [Cantidad Muestra]); ALLSELECTED( ); VALUES(Table1[Sample No_]))
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

why does the column Cantidad Muestra not aggregate?

 

Try this:

Cantidad Muestra TRY =  SUMX(SUMMARIZE(Table1, Table1[Sample No_], "@Cantidad Muestra", [Cantidad Muestra]), [@Cantidad Muestra])

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors