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
smoka3
Frequent Visitor

¿Valor de búsqueda mediante Search-ContainsString?

Hola expertos, ¿podrían ayudar a encontrar la solución para mi requisito

Tengo 2 tablas con 40K filas en cada tabla,

Tengo segmentación con columna de paquete de la Tabla A y tengo una tabla visual de la Tabla B,

ninguna relación entre la Tabla A y la Tabla B debido a ningún valor de clave común, pero TableA[package] es una subcadena de TableB[Command]

mi requisito es, cuando filtre TableA[package] usando slicer, los datos relacionados deben filtrarse en tableB.

¿cómo puedo resolver esto?

Intenté la tabla calculada usando la función CONTAINSSTRING

He intentado la función de búsqueda y la función LOOKUPVALUE

nada funcionó para mí.

aquí hay datos parecen

Tabla A:

Paquete
getHelp
getSales

migarteData

Tabla B: (puede contener duplicados en la columna de comandos)

ServicioComando
Servicio1 C:-archivo-fuente-getHelp-carpeta-aaa
Servicio2 •Grupo de archivos, carpeta, getSales, getSales,
Servicio3 service.ex migró datos de 2
Servicio4 D:-archivo-fuente-getHelp-carpeta-aaa

Salida esperada

ServicioComandoPaquete
Servicio1 C:-archivo-fuente-getHelp-carpeta-aaagetHelp
Servicio2 •Grupo de archivos, carpeta, getSales, getSales,getSales
Servicio3 service.ex migratedata de 2migratedata
Servicio4 D:-archivo-fuente-getHelp-carpeta-aaagetHelp

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@smoka3 , Crear una nueva columna en TableB

maxx(filter(TableA, CONTAINSSTRING(TableB[Command], TableA[Package])),TableA[Package])

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@smoka3 , Crear una nueva columna en TableB

maxx(filter(TableA, CONTAINSSTRING(TableB[Command], TableA[Package])),TableA[Package])

¡Gracias!

Greg_Deckler
Super User
Super User

@smoka3 - Así que básicamente este es un selector complejo - https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534.

Algo así.

En su caso, algo como esto:

Measure =
  VAR __Command = MAX('Table B'[Command])
  VAR __Table = ADDCOLUMNS(ALL('Table A'),"Include",FIND([Package],__Command,,0))
RETURN
  MAXX(FILTER(__Table,[Include]>0),[Package])

Paquete... lol...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

¡Gracias!

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.