Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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?
@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.
| User | Count |
|---|---|
| 50 | |
| 41 | |
| 32 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |