Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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:
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 21 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 59 | |
| 52 | |
| 41 | |
| 33 | |
| 32 |