Forum Discussion
Hero11
1 year agoNew Member
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...
- 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
shafiz_p
1 year agoSuper User
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