Forum Discussion
rwilcox
10 years agoNew Member
Adding custom column
I am trying to write the if then statement for adding a new column. If the country column is null then return "USA" or return the value from the country column I thought I had the statement w...
- Anonymous9 years ago
Th formula for the NewCountryColumn should be like
=IF(isblank([Country]),"USA",[Country])
If this works please accept this as a solution and also give KUDOS.
Cheers
CheenuSIng
- 9 years ago
Are you doing this in Get Data or DAX? I recommend the former.
The if statement in Power Query is written as follows
= if [country] is null then "USA" else [country]
pardeep657
9 years agoRegular Visitor
so what is the solution? I tried IF(isblank([Country]),"USA",[Country]) it does not work.
DJPrometheus
7 years agoMicrosoft Employee
The correct answer if you have added a Custom Column is the following:
= if [country] is null then "USA" else [country]