I have the following table & I want to generate a summary. This can be easily done using pivot tables. But, I would like to use lambda & related helper functions to achieve the same. At present, I´m getting the output with formula copied to each cell. I would like to avoid this & write formula in a single cell. The formula should get the data, header & the numbers. I´m faltering in getting the correct lambda function for this. Can the experts in this forum help please?
Source table:
Summary table:
Source table:
excel problems.xlsx | ||||||
---|---|---|---|---|---|---|
B | C | D | E | |||
2 | id | module | name | result | ||
3 | 1 | C | dfd | pass | ||
4 | 2 | C | cvcfdf | fail | ||
5 | 3 | L | wertew | fail | ||
6 | 4 | L | r | pass | ||
7 | 5 | L | qew | no result | ||
8 | 6 | L | ioi | pass | ||
9 | 7 | C | h | pass | ||
10 | 8 | C | u | pass | ||
11 | 9 | C | ioi | fail | ||
12 | 10 | L | wewq | pass | ||
13 | 11 | L | cvxz | fail | ||
14 | 12 | L | hjg | fail | ||
15 | 13 | L | ew | no result | ||
16 | 14 | L | yui | pass | ||
17 | 15 | C | cx | no result | ||
18 | 16 | C | ad | pass | ||
19 | 17 | C | gd | fail | ||
20 | 18 | L | jgj | pass | ||
21 | 19 | L | kj | fail | ||
22 | 20 | L | xz | pass | ||
23 | 21 | C | ñk | fail | ||
24 | 22 | C | kh | pass | ||
25 | 23 | C | hf | pass | ||
26 | 24 | C | gd | fail | ||
27 | 25 | L | fs | pass | ||
Sheet1 |
Summary table:
Cell Formulas | ||
---|---|---|
Range | Formula | |
H3:H4 | H3 | =LET( tId, Table1[id], m, Table1[module], COUNT(UNIQUE(FILTER(tId,m=G3)))) |
I3:K4 | I3 | =LET( tId, Table1[id], m, Table1[module], r, Table1[result], ROWS(FILTER(r,(m=$G3)*(r=I$2)))) |