I have data in my dataset similar to the following:

```
Date StockCount Color Size Model
01/01 3 Red L A
01/01 0 Blue L A
01/01 0 Red M A
01/01 2 Blue M A
01/01 1 Red S A
01/01 5 Blue S A
01/01 4 Red L B
01/01 1 Blue L B
01/01 6 Red M B
01/01 1 Blue M B
01/01 2 Red S B
01/01 4 Blue S B
01/02 1 Red L A
01/02 7 Blue L A
01/02 6 Red M A
01/02 0 Blue M A
01/02 0 Red S A
01/02 2 Blue S A
01/02 4 Red L B
01/02 5 Blue L B
01/02 1 Red M B
01/02 7 Blue M B
01/02 2 Red S B
01/02 2 Blue S B
```

I’m graphing stock counts over time to show the rise and fall of levels over time. It is a simple line grpah with controls allowing you to select Size and Model- either a specific value, or just Select all.

I’d like to calculate what percent of the widgets in stock are Red for the set combination of model andsize and produce a visual across the days showing how that percentage changes.

I’ve tried a calculated field

sumIf(StockCount,Color=‘Red’)/sum(StockCount)

but this just returns 0 for all days.

Thank you for your time and attention.