I've searched for similar posts to my question but hard to find answers because I keep getting links to pages that explain how to subtotal a filtered list (as in a table list) and not when using the FILTER function and so hoping someone can help.
I have a structured table called Tbl_Data (Sample also attached)
Key Cost QtyOld QtyNew QtyDiff Inclusions
AAA 1.5 10 4 6 Include
AAA 1.5 3 6 -3 Include
BBB 2.5 5 7 -2 Include
CCC 3.5 4 3 1 Include
AAA 1.5 9 4 5 Exclude
BBB 2.5 2 9 -7 Include
BBB 2.5 15 6 9 Exclude
CCC 3.5 8 2 6 Include
FILTER sample.xlsb
I need to use something other than a pivot and I'm attempting to use the filter function to output/list a subset of data where the filter will only use rows with "Include" and then aggregate or sum the total by each key.
The following formula will give me a list/table with the first, 3rd, 4th & 5th columns where [Inclusions] = "Include"
=FILTER(INDEX(Tbl_Data,SEQUENCE(ROWS(Tbl_Data)),{1,3,4,5}),Tbl_Data[Inclusions]="Include",0)
The problem I need help with is aggregating or totalling the QtyOld, QtyNew & QtyDiff by each key so as to end up with the following;
Key QtyOld QtyNew QtyDiff
AAA 13 10 3
BBB 7 16 -9
CCC 12 5 7
If that's too difficult then can I just get QtyDiff totalled by each Key ? ;
Key QtyDiff
AAA 3
BBB -9
CCC 7
Can either of these be done with Filter ?
Thanks in advance.
Gavin
Bookmarks