Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to do a count if based on one column being multiplied by various percentage columns across e.g. below:
Unit Total | 5% | 10% | 20% | 30% | 40% | 50% | 60% | 70% | 80% | 90% | 100% |
200 | 10 | 20 | 40 | 60 | 80 | 100 | 120 | 140 | 160 | 180 | 200 |
1000 | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 |
1500 | 75 | 150 | 300 | 450 | 600 | 750 | 900 | 1050 | 1200 | 1350 | 1500 |
3000 | 150 | 300 | 600 | 900 | 1200 | 1500 | 1800 | 2100 | 2400 | 2700 | 3000 |
I would like to count if the values that are between say 200 and 1000 only for units that are under the 40% column that also takes into account the 40% multiplied from the Unit Total (40% from 200 = 80, 40% from 1000 = 1000,etc.) without creating a table like the one above and counting the values based on the columns.
perhaps something like,
count(
if(UnitTotal x Percentage >=200 and UnitTotal x Percentage<=1000, UnitTotal x Percentage)
)
perhaps something like,
count(
if(UnitTotal x Percentage >=200 and UnitTotal x Percentage<=1000, UnitTotal x Percentage)
)