Forum Discussion
Anonymous
4 years agoNot applicable
Correlation Matrix
Hi
I want to create a correlation matrix from a table as this one:
| set | id | value |
| A | 1 | X |
| A | 2 | Y |
| A | 3 | Y |
| A | 4 | X |
| A | 5 | Z |
| B | 1 | X |
| B | 2 | Y |
| B | 3 | X |
| B | 4 | X |
| B | 5 | Y |
| C | 1 | X |
| C | 2 | Y |
| C | 3 | X |
| C | 4 | X |
| C | 5 | X |
and to be able to select 2 sets for showing a matrix as this (if A+B sets selected):
| A | ||||
| X | Y | Z | ||
| B | X | 2 | 1 | |
| Y | 1 | 1 | ||
| Z |
how can i do that?
1 Reply
- Greg_DecklerCommunity Champion
Anonymous You will need a disconnected table that you could create like the following:
Table 2 = DISTINCT(SELECTCOLUMNS('Table',"set",[set],"value",[value]))Use this for your columns or your rows and use the original table for the other. Then you can get the MAX of set and value for each table. Then use FILTER of ALL to grab the rows for each and then INTERSECT and COUNTROWS to count the matches.