I have many tables and from that, I need to create a summary table.
Table 1 -
IDs | PSC id | PSC | ACV id | ACV |
---|---|---|---|---|
A3 | True | 2 | False | 4 |
A4 | True | 3 | True | 1 |
A5 | False | 4 | False | 4 |
A6 | False | 5 | True | 6 |
Table 2 -
IDs | PSC id | PSC | ACV id | ACV |
---|---|---|---|---|
A5 | True | 12 | False | 7 |
A6 | True | 3 | True | 3 |
A7 | False | 4 | False | 4 |
A9 | False | 5 | True | 1 |
The summary table should be like this (summation of all True and Summation of all False )
Table | ACV | PSC |
---|---|---|
Table 1- True | 7 | 5 |
Table 1 -False | 8 | 9 |
Table 2- True | 4 | 15 |
Table 2 -False | 11 | 9 |
This isn't straightforward - maybe Ron or Horseyride have better ideas.
Add a custom column to each table with the table name. e.g.
Table 1:
Table 2:
Append queries as new:
Appended table:
Group exactly as follows:
Add a custom column:
List.Sum( Table.SelectRows(Source, (x)=> x[Custom] = [Custom] and x[ACV id] = [PSC id])[ACV])
Final result: