Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
dkrid
Frequent Visitor

Need help sorting a Matrix with images

Hello,

   I need to create a matrix that shows overtime hours that each worker does in each day in a selected month. But instead of showing the OT hours as numbers, the matrix will show the OT hours as circles whose radius corresponds to the number of OT hours. (The more OT hours the worker does, the larger the circle). Here is what I've done so far - I use SVG to draw circles. (Here a month of April is selected so there are 30 columns (From 1 Apr to 30 Apr).)

 

image.png

 

But I want to also sort the matrix by the number of total OT hours each worker does in a month. FIrst I try to add a subtotal column and then sort that column. The problem is that the sorting order is incorrect. I hover a mouse over a circle and this is what I think is the culprit: The value of the data is not the total OT hours but the SVG code that I used to draw a circle.

image.png

But now I have no idea what I should do in order to sort the matrix by the number of total OT hours. Any suggestions?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dkrid , You can use isfiltered or isinscope and change measure from svg to value(at sub total/total level) and then sort on that

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@dkrid , You can use isfiltered or isinscope and change measure from svg to value(at sub total/total level) and then sort on that

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

I used isinscope per your suggestion. I ran into another problem regarding mixing svg and value but I fould a way to sidestep that problem. So now I can sort my matrix by the total OT hours. Thanks, Krid

Thank you for the suggestion. Give me some time to digest the information - I am still quite new to Power BI. Best regards, Krid.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.