Dear All,
I had a problem regarding to M code.
I want to know how can I write M code for identify "null" value and replace to "Missing" value base on another question.
Example: question1 and question2 below:
-If question1 answer 1 then question2 (replace "null" to "Missing")
-If question1 answer 2 then question2="null"
Thanks by advance for your help
Best regard,
Socheat
Hi Socheat,
Welcome to our forum.
It's difficult to be exact without seeing your data, but I would add a conditional column that returns either 'Missing' or 'null' based on the questions and answers you define in your logical tests. You can then delete the column containing the nulls you wanted to replace.
If you're still stuck, please provide a sample file so we can see what you're referring to and clarify what you want as your end result.
Mynda
Hi Mynda,
Thanks by advance for your recommendation.
In fact, it is very useful.
Now, I could solve this problem according to your recommendation.
I do not have any data yet.
It is my real plan to clean my data in the future.
Your sincerely,
Socheat