Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
@hgelman 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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 135 | |
| 103 | |
| 65 | |
| 61 | |
| 55 |