Forum Discussion
Return Text when RELATED Function has not match in related table
Hi,
When adding a column to a calculated table from another table using RELATED(), I would like to return "Text" where there is no related ID in the second table. I can accomplish this through adding the related column and then adding a second column using ISBLANK(), but I wanted to be able to do this by only adding one column. *If this were a LOOKUP(), I could return the alternate text).
Is there a way to combine or nest the following?
1) Next_Enroll_Outcome a = Related('4_Enrollment'[Enroll_Inst_Outcome])
2) Next_Enroll_Outcome = If(ISBLANK('2_Enrollment'[Next_Enroll_Outcome a]),"3_StopOut",'2_Enrollment'[Next_Enroll_Outcome a])
Thank you.
I think this is what you are looking for.
Next_Enroll_Outcome = COALESCE ( Related('4_Enrollment'[Enroll_Inst_Outcome]), "3_StopOut" )
2 Replies
- jdbuchanan71
Super User
I think this is what you are looking for.
Next_Enroll_Outcome = COALESCE ( Related('4_Enrollment'[Enroll_Inst_Outcome]), "3_StopOut" ) - tinleyjjNew Member
Thanks! Made building this longitudinal tracking project much easier.