Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi experts,
I'm calculating a symmetric matrix with following tables (It is just a portion of the data):
| Sport A Label | Sport B Label | QtUsersIntersection | QtUsersSportOther |
| Baloncesto | Balonmano | 16 | 288 |
| Baloncesto | eSports | 29 | 288 |
| Baloncesto | Fútbol Sala | 262 | 288 |
| Balonmano | Baloncesto | 16 | 30 |
| Balonmano | eSports | 5 | 30 |
| Balonmano | Fútbol Sala | 22 | 30 |
| eSports | Baloncesto | 29 | 50 |
| eSports | Balonmano | 5 | 50 |
| eSports | Fútbol Sala | 29 | 50 |
| Fútbol Sala | Baloncesto | 262 | 294 |
| Fútbol Sala | Balonmano | 22 | 294 |
| Fútbol Sala | eSports | 29 | 294 |
The column "QtUsersSportOther" is comming from another table, and looks like this:
| sport | QtUser |
| Baloncesto | 288 |
| Balonmano | 30 |
| eSports | 50 |
| Fútbol Sala | 294 |
My measure is as follows :
% us = CALCULATE(DIVIDE(SUM(SportsIntersection[QtUsersIntersection]);Sum(SportsIntersection[QtUsersSportOther]); 0))
and I want to create a symetric matrix. The output I'm getting is:
However, as it is a symetric matrix, It should look like this:
I've created this ilustration to explain what I have in mind, but I can't get to translate to DAX, so I need help in this:
From the table above, from sport A ("Baloncesto") and SportB ("Futbol Sala"); and "Balonmano" and "Futbol Sala"; and "eSport" and "Futbol Sala" are already calculated, fill with blank all the rows related to the column SportA to "Futbol Sala" and so on.
I'm really stuck with this. Any suggestion?
Hope I've made myself understood.
Solved! Go to Solution.
Sure. Is your visual always going to have the fields in alphabetical order? If so, you just need a minor change to your measure. Otherwise, you'll need some sort of other ranking system to let PowerBI know the order of the categories.
% us = CALCULATE(DIVIDE(SUM(SportsIntersection[QtUsersIntersection]);Sum(SportsIntersection[QtUsersSportOther]); 0); FILTER(SportsIntersection; SportsIntersection[Sport A Label]< SELECTEDVALUE(SportsIntersection[Sport B Label])))
Sure. Is your visual always going to have the fields in alphabetical order? If so, you just need a minor change to your measure. Otherwise, you'll need some sort of other ranking system to let PowerBI know the order of the categories.
% us = CALCULATE(DIVIDE(SUM(SportsIntersection[QtUsersIntersection]);Sum(SportsIntersection[QtUsersSportOther]); 0); FILTER(SportsIntersection; SportsIntersection[Sport A Label]< SELECTEDVALUE(SportsIntersection[Sport B Label])))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |