Forum Discussion

Hero11's avatar
Hero11
New Member
1 year ago
Solved

Multiple Conditions into 1 Calculated Column

Need some help to finish some DAX.  I have 2 Tables (A & B).  On Table-A, I have various columns one of which is a Column (TurnArounds) that lists turnaround times by day type: Expedited, Calendar Da...
  • shafiz_p's avatar
    1 year ago

    Hi Hero11  Try the below code:

    Grab DueDate = 
    VAR CurrentID = 'Table A'[Unique_ID]
    VAR CurrentTurnAround = 'Table A'[TurnArounds]
    RETURN
    SWITCH(
        CurrentTurnAround,
        "Expedited", LOOKUPVALUE('Table B'[Expedited], 'Table B'[Unique_ID], CurrentID),
        "Calendar Days", LOOKUPVALUE('Table B'[Calendar Days], 'Table B'[Unique_ID], CurrentID),
        "Working Days", LOOKUPVALUE('Table B'[Working Days], 'Table B'[Unique_ID], CurrentID),
        BLANK()
    )

     

    Here is the expected result:

     

     

    Hope this helps!!

    If this solved your problem, please accept it as a solution and a kudos!!

     

    Best Regards,
    Shahariar Hafiz