Forum Discussion
aso1
6 years agoHelper II
if statement column
I have a column with different usernames. some contain some prefixes such as "DOMAIN\" and others dont have these prefixes. I want a custom column that attaches a text if X is something. Exactly l...
- 6 years ago
Hi aso1 ,
Try this for a custom column on Power Query:
if Text.StartsWith(Text.Upper([Column1]), "NT SERVICE")
or Text.StartsWith(Text.Upper([Column1]), "NT AUTHORITY")
then "SQL System"
else
if Text.StartsWith(Text.Upper([Column1]), "DOMAIN\") then
"Windows Authentication"
else "SQL Authentication"
camargos88
6 years agoCommunity Champion
Hi aso1 ,
Try this for a custom column on Power Query:
if Text.StartsWith(Text.Upper([Column1]), "NT SERVICE")
or Text.StartsWith(Text.Upper([Column1]), "NT AUTHORITY")
then "SQL System"
else
if Text.StartsWith(Text.Upper([Column1]), "DOMAIN\") then
"Windows Authentication"
else "SQL Authentication"