Forum Discussion

OpenMike13's avatar
OpenMike13
Frequent Visitor
4 years ago
Solved

Creating Custom Column "status" based on multiple columns.

Hello    Im having issues trying to find a way to create a custom Status column based on multiple other columns within the same table. I am looking to provide a status on a class shipments based on...
  • PhilipTreacy's avatar
    4 years ago

    Hi OpenMike13 

     

    Download example PBIX file

     

    This will create your column

     

    Status = 
    
    SWITCH(
    
        TRUE(),
    
        NOT ISBLANK([Date Returned]), "Completed/Returned",
    
        NOT ISBLANK([Date of delivery to course]), "Delivered to Course",
    
        NOT ISBLANK([Date shipped]), "Shipped to Course",
    
        "Order Received"
    )

     

     

     

    Note that you don't have any status for something that is scheduled for return, and not yet returned.  But you just need to add another line to the code above for that.

     

    Regards

     

    Phil