Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have the following data about ownership of barbers in three barber shops
I'm interested presenting a matrix on PBI where the rows are barbers that are owners in at least one barber shop and the columns are all barbers. Each cell in the matrix to represent relationship between the barbers when they're owners and the rest of the barbers. If two barbers own a barbershop their relationship is "owners" even if other barber shop one of them is tenant. If the second barber is always a tenant in owner's barber shop than it's a owner-tenant relationship. Same barber is "same person". Any other relationship remains blank.
I expect the following result:
Solved! Go to Solution.
@Sasha ,
Drag [Barber] from Table2 to Rows and add measure below.
Table2 = FILTER ( Table1, Table1[Status] = "Owner" )
Measure = SWITCH ( TRUE (), SELECTEDVALUE ( Table2[Barber] ) = SELECTEDVALUE ( Table1[Barber] ), "Same Person", NOT ( ISEMPTY ( FILTER ( Table1, Table1[BarberShop] IN VALUES ( Table2[BarberShop] ) && Table1[Status] = "Owner" ) ) ), "Owners", NOT ( ISEMPTY ( FILTER ( Table1, Table1[BarberShop] IN VALUES ( Table2[BarberShop] ) ) ) ), "Owner-Tenant" )
@Sasha ,
Drag [Barber] from Table2 to Rows and add measure below.
Table2 = FILTER ( Table1, Table1[Status] = "Owner" )
Measure = SWITCH ( TRUE (), SELECTEDVALUE ( Table2[Barber] ) = SELECTEDVALUE ( Table1[Barber] ), "Same Person", NOT ( ISEMPTY ( FILTER ( Table1, Table1[BarberShop] IN VALUES ( Table2[BarberShop] ) && Table1[Status] = "Owner" ) ) ), "Owners", NOT ( ISEMPTY ( FILTER ( Table1, Table1[BarberShop] IN VALUES ( Table2[BarberShop] ) ) ) ), "Owner-Tenant" )
@v-chuncz-msft how can I sort the columns of the output in my example so all the the barbers that have "the same" person will appear first similarly to the order they appear in the rows and only after that the rest barbers (that basically only rent) will appear in the columns. In this case, the diagonal will be continuous and this will obviously be more pleasing visually.
Awesome!
Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |