camilaarbigaus
New Member
- Joined
- Apr 17, 2024
- Messages
- 5
- Office Version
- 2016
- Platform
- Windows
Hi all, I am trying to calculate the percentiles in a frequency table, but I'm having trouble creating the cum sum with multiple criteria - the idea is to replicate the values in column D
I was able to calculate the cum sum per color, but not accounting for state with the following formula (in google sheets - and I don't know if this is the best way as I'm finding some errors in the way):
=IF(B2<>"Blue","",c2+ArrayFormula(LOOKUP(2,1/(ISNUM(D$1:D2)),D$1:D2)))
Does anybody have any idea on how to do it? With the cumulative sum, I'll be able to calculate the percentiles per state per color
Thnak you very much!!
State | Color | Count | Cum. sum for "blue" per state |
Alabama | Blue | 2 | 2 |
Alabama | Yellow | 4 | |
Alabama | Blue | 6 | 8 |
Alabama | Red | 8 | |
Alabama | Red | 10 | |
Alaska | Yellow | 11 | |
Alaska | Blue | 3 | 3 |
Alaska | Red | 4 |
I was able to calculate the cum sum per color, but not accounting for state with the following formula (in google sheets - and I don't know if this is the best way as I'm finding some errors in the way):
=IF(B2<>"Blue","",c2+ArrayFormula(LOOKUP(2,1/(ISNUM(D$1:D2)),D$1:D2)))
Does anybody have any idea on how to do it? With the cumulative sum, I'll be able to calculate the percentiles per state per color
Thnak you very much!!