Forum Discussion
smacsween
5 years agoFrequent Visitor
Conditional merge columns
i am trying to merge columns based on an IF statement and ISBLANK. If I have Country name in Table1, use that value, if not, use the Country value from Table2. I can't see how to do this, I have...
Icey
5 years agoCommunity Support
Hi smacsween ,
SELECTEDVALUE('Table1'[Country]) will only return the countries included in Table1, and will not compare the countries in Table1 and Table2 to see if they are included. Same as SELECTEDVALUE('Table2'[Country]).
So, if "Country 1" is only contained in Table2, SELECTEDVALUE('Table1'[Country]) will not return blank for it.
It is suggested to create a table like below and create relationships among them:
NewTable =
UNION ( DISTINCT ( Table1[Country] ), DISTINCT ( Table2[Country] ) )
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.