Forum Discussion
Conditional column selecting column from other table
- Anonymous7 years ago
Anonymous
Got it! So you can merge the tables with a LEFT JOIN. Then you can create a new conditional column with the format:
IF [new column] = null THEN output=Column1, ELSE [new column]
]
Hi Anonymous
I also want to change the null that I will have in the merged table by the Customer name (entity name) from Table A.
Anonymous
So do you have some customers in Table B that are not in Table A? If so, since you are using a left join, those customers would not appear in your merged table.
- Anonymous7 years agoNot applicable
Anonymous
But I need to have a complete table by short name or entity name.
- Anonymous7 years agoNot applicable
Anonymous
I think I am confused as to what your two tables contain. Does Table A overlap with Table B? I know that there are entries in Table A that are not in Table B but are there also entries in Table B that are not in Table A?
- Anonymous7 years agoNot applicable
Hi Anonymous
I think now will be easier to understand.
Table A Table B Output Customer Customer Short Name Short Name Power BI AS Power BI AS Power BI Power BI Power BI Ltd Power BI Ltd Power BI Power BI Power BI Desktop AS Power BI Desktop AS Power BI Power BI Power BI Service AS Power BI Service AS Power BI Power BI Micro AS Micro AS Micro Micro Micro Soft Ltd Micro Soft Ltd Micro Micro Solutions AS Solutions AS Mobile Ltd Mobile Ltd Consulting Ltd Consulting Ltd