Forum Discussion
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!
- Anonymous6 years ago
Finally found the solution!
Cantidad Muestra TRY = CALCULATE( SUM( [Cantidad Muestra]); ALLSELECTED( ); VALUES(Table1[Sample No_]))
2 Replies
- mwegenerMost 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.
- AnonymousNot applicable
Finally found the solution!
Cantidad Muestra TRY = CALCULATE( SUM( [Cantidad Muestra]); ALLSELECTED( ); VALUES(Table1[Sample No_]))