Hello,
I am trying to count the number of instances a value recurs by looking into all the rows that came before this active row.
For example
Row | Amount | Count of occurrences (expected output) |
1 | (0.43) | 1 |
2 | 253,317.76 | 1 |
3 | 120,445.16 | 1 |
4 | 60.90 | 1 |
5 | 0.43 | 1 |
6 | (86,272.00) | 1 |
7 | (31,920.52) | 1 |
8 | (395,127.53) | 1 |
9 | (26,766.62) | 1 |
10 | (2,073,374.98) | 1 |
11 | (858,246.33) | 1 |
12 | (5,109.58) | 1 |
13 | (664.15) | 1 |
14 | (6,035.00) | 1 |
15 | (6,300.00) | 1 |
16 | (5,880.00) | 1 |
17 | (0.43) | 2 |
18 | 0.43 | 2 |
19 | (0.43) | 3 |
For example, in table above row 5 is showing that 0.43 has 1 count when considering all rows before and in row 18 the count will change to 2 as now there are 2 instances of 0.43 while considering all rows before row 18.
In excel the formula I use is COUNTIF(J$1:J2,J2) however not sure how to do this in Alteryx.
Appreciate any help I can get on this. Thank you.
Solved! Go to Solution.
I have used a multi-row formula grouped by value and then said look at the previous occurrence of a value and add one to its running count from before. If it is the first occurrence set the running count to 1.
The formula just cleans the negative numbers indicated by brackets into negative numbers but the multi-row could be applied to the string values and the same result would be attained if you dont want to change that
Thank you! This worked wonders!
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |