Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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 like this :
Desired output :
if Name starts with 'NT SERVICE' or 'NT Authority' then type 'SQL System'
if Name starts with 'DOMAIN\' then type 'Windows Authentification'
if Name starts does NOT start with "DOMAIN" - then type SQL Authentification'
how can I achieve this? I would like to create a custom-column preferably.
thanks!
Solved! Go to Solution.
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"
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"
HI @aso1 ,
You can create a calculated column using DAX as follows:
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 31 | |
| 22 | |
| 19 |
| User | Count |
|---|---|
| 132 | |
| 100 | |
| 56 | |
| 37 | |
| 37 |