Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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 |
|---|---|
| 55 | |
| 37 | |
| 26 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 39 | |
| 21 | |
| 21 |