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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors