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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HenryJS
Post Prodigy
Post Prodigy

Si Columna Contiene tres 'cadenas'

Hola a todos

¿Es posible crear una nueva columna que indique IF [Disciplinas] -< 3 'Strings' ENTONCES Sí

Una cadena es cualquier cosa con un , entre ella.

Así que Works Manager es una cadena

El técnico es una cadena, etc..

Capture.JPG

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hola @HenryJS ,

También puede intentar usar DAX para crear una columna calculada.

Column = IF(SEARCH( "*,*,*", 'Table'[Disciplines], 1, 0 ) > 0,BLANK(),"Yes")

test_search.PNG

Saludos
Liang
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hola @HenryJS ,

También puede intentar usar DAX para crear una columna calculada.

Column = IF(SEARCH( "*,*,*", 'Table'[Disciplines], 1, 0 ) > 0,BLANK(),"Yes")

test_search.PNG

Saludos
Liang
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

parry2k
Super User
Super User

@HenryJS lo que define la cadena, el espacio entre las palabras o qué? dio el ejemplo de lo que es una cadena, pero lo que 3 cadena, proporcione la lógica.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hola @parry2k

En este caso cualquier cosa que tenga, además de ella.

Así que podríamos hacer una declaración que dice que si hay más de 2 "," ENTONCES No

¿Tiene sentido?

Así que si el campo tiene más de 2 "," en cualquier parte del texto Entonces NO ELSE YES

@HenryJS Yo recomendaría agregar una columna personalizada en la consulta de poder para obtener el recuento y luego puede derivar su lógica de allí

aquí hay un código M rápido que puede pegar en la consulta en blanco y comprobarlo y más tarde agregar a su consulta.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSkxK1oFipVidaKWKyiowjSyWmJiog4TBYsnJyTpArBQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "String Count", each List.Count( Text.Split([Column1],",")), Int64.Type)
in
    #"Added Custom"



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k dónde puedo poner este código?

Y en la columna de condición ¿ cómo encomiendo el ,Capture.JPG

@HenryJS iniciar una consulta en blanco y hacer clic en editor avanzado y pegarla allí.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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