Forum Discussion
Help please - if null replace with data from another column
Hi All,
I am trying to adding a new column basically combining the data from the first two columns (marked A & B in the image).
If column A has a A, new column = A.
Or if column A is null, new column = B.
I tried to use 'add column' and 'add conditioned column' and both came back with the same result - new column is only picking up value from column A but not column B.
Can someone please help and tell me what I have done wrong??
I changed the data type after adding the new column but doesn't solve the problem.
Thank you.
6 Replies
- Gabriel_WalkmanContinued Contributor
I'd guess empty is not the same as N/A. Try N/A or null instead of that empty field in your conditional column.
- yc-bsaRegular Visitor
Hi Gabriel,
Thanks for your reply. I did try using null.type but same result (only pick up from column A)
- Gabriel_WalkmanContinued Contributor
Try "N/A" instead of Null.Type. Or replace the N/A values to null and then check for null (not Null.Type).
- V-lianl-msftCommunity Support
Hi yc-bsa ,
After trying what Gabriel_Walkman said, does the problem still exist?
If the problem persists, could you share a sample pbix after deleting sensitive data?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- yc-bsaRegular Visitor
Hi V-lianl-msft ,
No, that doesn't solve the problem.
I am unable to attach the file so I did another screenshot to show what the problem is if that helps to clarify my question.