Forum Discussion
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?
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" )
4 Replies
- v-frfei-msftCommunity Support
Hi StantonD,
Kindly share your sample data and excepted result to me, so that I can help with it.
Regards,
Frank
- StantonDFrequent Visitor
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.
ID MODIFIEDDATE SHAREPOINTID REQUESTSTATUS CONTENTTYPE MODIFIEDTIME 173023 06-Aug-18 116 Prework MK236 Item 15:41:57.0000000 190649 14-Aug-18 124 Prework MK236 Item 11:04:54.0000000 229893 04-Sep-18 134 Prework MK236 Item 11:02:05.0000000 244155 12-Sep-18 144 PIR Setup MK236 Item 13:07:42.0000000 251510 17-Sep-18 146 PIR Setup MK236 Item 15:19:11.0000000 256498 20-Sep-18 151 PIR Setup MK236 Item 11:39:44.0000000 254799 19-Sep-18 152 PIR Setup MK236 Item 12:59:15.0000000 261485 24-Sep-18 155 PIR Setup MK236 Item 15:24:02.0000000 266367 27-Sep-18 156 PIR Setup MK236 Item 11:56:44.0000000 267290 27-Sep-18 157 PIR Setup MK236 Item 18:00:51.0000000 268427 28-Sep-18 158 Data MK236 Item 12:50:01.0000000 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.
- v-frfei-msftCommunity Support
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"))
For more details, please check the pbix as attached.
Regards,
Frank