I'm planning to create a dynamic cell which can count total items or only certain items. I used the following formula to get the total items. But this formula doesn't work when I filter by item.
=ARRAYFORMULA(SUM(COUNTIFS(A:A;{“D1”;{“APPLE”;”ORANGE”;”POMEGRANATES”}};B:B;”1/6/2022″)))
*D1 = Dropdown for Apple/Orange/Pineapple/Pomegranates
The result I expect is:
If I select Apple then the only value that appears is Apple (4/10).
- Apple = 4
- Orange = 3
- Pineapple = 1
- Pomegranates = 2
And If I don’t select Apple then the values that appear are all values (10/10)
- All Fruit = 10
I would be very grateful if you could tell me where the error is and provide a solution.