Hi All,
I have table in which I have selected rows where subject is science or Math (using select where function). Now I want to create associative array which stores the row number of all selected with unique entries of a particular column.
After that I want to start a loop for all keys of the associative array. Which will subset the rows from key[i] to Key[i+1] for each value.
For Example:
| Row_Number | Student | Sequence | Subject |
| 1 | A | 1 | Economics |
| 2 | A | 2 | Science |
| 3 | A | 4 | Physics |
| 4 | A | 5 | Math |
| 5 | A | 2 | Science |
| 6 | A | 4 | Chemistry |
| 7 | A | 6 | Science |
| 8 | A | 2 | Math |
| 9 | A | 1 | Social |
*Rows in blue color, I have selected using select where function.
- I want to create variables which store Associative Array : ["Science" => {2,5,7}], "Math" => {4,8}].
- Then I want to create a loop for both keys which will subset and generate 3 tables.
- Table 1: From row number 2 to 5
- Table 2: From row number 5 to 7
- Table 3 : From row number 4 to 8
Please help, how I can solve.
Thanks