Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
aso1
Helper II
Helper II

si columna de declaración

Tengo una columna con diferentes nombres de usuario. algunos contienen algunos prefijos como "DOMAIN" y otros no tienen estos prefijos.

Quiero una columna personalizada que adjunte un texto si X es algo. Exactamente así :

Salida deseada :

si Name comienza con 'NT SERVICE' o 'NT Authority' escriba 'SQL System'

si Name comienza con 'DOMAIN', escriba 'Windows Authentification'

si Name starts NO comienza con "DOMAIN" - escriba SQL Authentification'

powerbi_customcolumnfor SQL_WindowsUsers.jpg

¿cómo puedo lograr esto? Me gustaría crear una columna personalizada preferiblemente.

¡Gracias!

2 REPLIES 2
camargos88
Community Champion
Community Champion

Hola @aso1 ,

Pruebe esto para una columna personalizada en Power Query:

if Text.StartsWith(Text.Upper([Column1]), "NT SERVICE")
o Text.StartsWith(Text.Upper([Column1]), "NT AUTHORITY")
luego "Sistema SQL"
Más
if Text.StartsWith(Text.Upper([Column1]), "DOMAIN- ") a continuación,
"Autenticación de Windows"
else "Autenticación SQL"



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Pragati11
Super User
Super User

HOLA @aso1 ,

Puede crear una columna calculada utilizando DAX de la siguiente manera:

ifContainsString á IF(CONTAINSSTRING(youTable[Name], "NT SERVICE") ? TRUE() ? CONTAINSSTRING(youTable[Name], "NT Authority") - TRUE(), "SQL System",
IF (CONTAINSSTRING (youTable[Name], "DOMAIN") - TRUE() , "Windows Authentication," "SQL Authentication") )
Gracias
Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors