Forum Discussion

StantonD's avatar
StantonD
Frequent Visitor
7 years ago
Solved

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 ...
  • StantonD's avatar
    StantonD
    7 years ago

    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"
    )