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

How to sum all records when grouped by a primary dimension, but only show sum on last record of the grouped dimension...

I am trying to get my expression in a strait table to look like the last column in the image below. Any ideas on how to do this with inter record functions?

Thanks.

ProductProduction LocationInventory CasesInventory Cases Sum Grouped By Production Location
12345100100
12345100150
1234510075325
123452003030
12345300200
12345300180
12345300530
123453004001310


12 Replies
Not applicable
Author

Thanks Fernando. I think this would have worked as well, but I went with the NMiller's recommendation.

Not applicable
Author

Fernando,

Your solutions actually placed the value on the last row of the group for me. So this one works for me as well. Here is an example. Thanks.

SKUBranch_PlantOrder_Num=sum(Inventory_Lbs)Sum(TOTAL <SKU, [Branch_Plant]> [Inventory_Lbs])Sum(TOTAL <SKU, [Branch_Plant]> [Inventory_Lbs]) WITH TEXT COLOR FORMATTING if(below(Branch_Plant,1)=Branch_Plant,white(),black())Aggr(Sum([Inventory_Lbs]), SKU, [Branch_Plant])
123457080011200,000550,000550,000550,000
123457080012300,000550,000550,000-
12345708001350,000550,000550,000-
123457080024200,000400,000400,000400,000
123457080025200,000400,000400,000-
123457080036450,0001,100,0001,100,0001,100,000
123457080037500,0001,100,0001,100,000-
123457080038150,0001,100,0001,100,000-
123457080049250,000250,000250,000250,000
1234570800510100,000150,000150,000150,000
123457080051150,000150,000150,000-


Not applicable
Author

Thank you for the answer. This can help me Big Smile