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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
StantonD
Frequent Visitor

Custom Sort for Multi-Row Card

I've got a report that uses multi-row cards to break up data by group. The only way I could find to create a custom sort for this type of visual was to put a spaces before the group name. It allowed the card to be sorted and would ignore the spaces when it displayed.

 

I needed to add a new group and found out that they have removed the ability to add spaces before a group name. As long as I don't edit the old group names they keep the extra space but any new groups just automatically remove the leading space. Is there some other way to apply a custom sort to this visual?

1 ACCEPTED SOLUTION

Thanks for the idea @v-frfei-msft

 

They did not want to have numbers before the categories, but I had not thought about manually creating the groups. I was using the built-in group creator. 

 

I was able to do something similar to what you suggested using a switch rather than if. That allowed me to create the options with leading blank space to setup sort order.

 

STATUSGROUPS = SWITCH('Table'[REQUESTSTATUS],
"PENDING GM APPROVAL","    APPROVAL/BOOKPRICE",
"PENDING GVP APPROVAL","    APPROVAL/BOOKPRICE",
"PENDING PIR AND BOOK PRICE SETUP","    APPROVAL/BOOKPRICE",
"Data","AVAILABLE TO WORK",
"Data Team","AVAILABLE TO WORK",
"ITEM NUMBER ASSIGNMENT","AVAILABLE TO WORK",
"MATERIAL CREATION","AVAILABLE TO WORK",
"REQUESTED","AVAILABLE TO WORK",
"Vendor Stock Data Team Final Review","AVAILABLE TO WORK",
"PIR Setup","  PIR SETUP",
"GM REJECTED","   REJECTIONS",
"GVP REJECTED","   REJECTIONS",
"REJECTED","   REJECTIONS",
"REJECTED AT ITEM NUMBER ASSIGNMENT","   REJECTIONS",
"REJECTED AT MATERIAL CREATION","   REJECTIONS",
"Requestor","   REJECTIONS"
)

 

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @StantonD,

 

Kindly share your sample data and excepted result to me, so that I can help with it.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @v-frfei-msft

 

This is an example of the sort of data I am working with. In PowerBI I have it setup so the values of REQUESTSTATUS are broken up into groups. I do this so the displayed data is the same for each task process. I need to be able to apply a custom order to those groups when they are displayed so they show in the same order across all tasks. For this task Prework falls into the IN PROCESS group and Data falls under AVAILABLE TO WORK.

 

Here is a sample of the data and how it shows up currently. PIR SETUP is the new group I added recently. I would like that to show up between AVAILABLE TO WORK and IN PROCESS.

 

IDMODIFIEDDATESHAREPOINTIDREQUESTSTATUSCONTENTTYPEMODIFIEDTIME
17302306-Aug-18116PreworkMK236 Item15:41:57.0000000
19064914-Aug-18124PreworkMK236 Item11:04:54.0000000
22989304-Sep-18134PreworkMK236 Item11:02:05.0000000
24415512-Sep-18144PIR SetupMK236 Item13:07:42.0000000
25151017-Sep-18146PIR SetupMK236 Item15:19:11.0000000
25649820-Sep-18151PIR SetupMK236 Item11:39:44.0000000
25479919-Sep-18152PIR SetupMK236 Item12:59:15.0000000
26148524-Sep-18155PIR SetupMK236 Item15:24:02.0000000
26636727-Sep-18156PIR SetupMK236 Item11:56:44.0000000
26729027-Sep-18157PIR SetupMK236 Item18:00:51.0000000
26842728-Sep-18158DataMK236 Item12:50:01.0000000

 

current_order.JPG

 

 

Before, I was able to add spaces to the front of the group names to manually set their order but now it ignores those spaces when I try to add them. 

Groups.JPG

 

 

 

Hi @StantonD,

 

Based on my test, we cannot sort the data directly in Multi-Row Card. However we can gourp the column like this to work around.

 

GROUP = IF(Table1[REQUESTSTATUS] = "PIR Setup","2 PIR Setup",IF(Table1[REQUESTSTATUS]="Data","1 AVAILABLE TO WORK","3 IN PROCESS"))

123.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thanks for the idea @v-frfei-msft

 

They did not want to have numbers before the categories, but I had not thought about manually creating the groups. I was using the built-in group creator. 

 

I was able to do something similar to what you suggested using a switch rather than if. That allowed me to create the options with leading blank space to setup sort order.

 

STATUSGROUPS = SWITCH('Table'[REQUESTSTATUS],
"PENDING GM APPROVAL","    APPROVAL/BOOKPRICE",
"PENDING GVP APPROVAL","    APPROVAL/BOOKPRICE",
"PENDING PIR AND BOOK PRICE SETUP","    APPROVAL/BOOKPRICE",
"Data","AVAILABLE TO WORK",
"Data Team","AVAILABLE TO WORK",
"ITEM NUMBER ASSIGNMENT","AVAILABLE TO WORK",
"MATERIAL CREATION","AVAILABLE TO WORK",
"REQUESTED","AVAILABLE TO WORK",
"Vendor Stock Data Team Final Review","AVAILABLE TO WORK",
"PIR Setup","  PIR SETUP",
"GM REJECTED","   REJECTIONS",
"GVP REJECTED","   REJECTIONS",
"REJECTED","   REJECTIONS",
"REJECTED AT ITEM NUMBER ASSIGNMENT","   REJECTIONS",
"REJECTED AT MATERIAL CREATION","   REJECTIONS",
"Requestor","   REJECTIONS"
)

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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