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
Connell
Regular Visitor

Problema con el filtrado

Hola

Aquí hay un ejemplo de mi situación - Tengo dos tablas con una relación uno a uno.

Tabla X

Sally12
Tom30
John20
Doe12
Emily9
Bob2

Y la mesa Y

John@
Doe#
Emily$
Bob%

Pongo el nombre de la tabla Y y el valor de la tabla X juntos y obtengo

12
30
John20
Doe12
Emily9
Bob2

obviamente no quiero las filas en blanco, sólo los nombres de la tabla Y y esos valores.

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hola @Connell ,

Cree una medida como se muestra a continuación:

_Value = IF(MAX('Table X'[Name]) in FILTERS('Table Y'[Name]),MAX('Table X'[Value]),BLANK())

Y verás:

Annotation 2020-08-17 124155.png

Para el archivo .pbix relacionado, pls ver adjunto.

Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hola @Connell ,

Cree una medida como se muestra a continuación:

_Value = IF(MAX('Table X'[Name]) in FILTERS('Table Y'[Name]),MAX('Table X'[Value]),BLANK())

Y verás:

Annotation 2020-08-17 124155.png

Para el archivo .pbix relacionado, pls ver adjunto.

Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
pranit828
Community Champion
Community Champion

Hola @Connell

Su problema se debe a la combinación que tiene en ambas tablas.

pranit828_0-1597446572194.png

Haga doble clic en la flecha diminuta como en la imagen de arriba.

Debe seleccionar la primera tabla segunda y segunda tabla como primera en la "ventana Editar relación".

pranit828_1-1597446779867.png

¿Resolví tu problema? ¡Marca mi puesto como una solución! Apreciamos sus Felicitaciones, Pulse el botón pulgares hacia arriba !!

saludos
Pranit





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
FrankAT
Community Champion
Community Champion

Hola @Connell

puede hacerlo con Power Query de la siguiente manera:

// Table X
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk7MyalU0lEyNFKK1YlWCsnPBXKMDcAcr/yMPCDPCMJzyU9FqHPNzQRrswTznPKTQOqUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}}),
    #"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Column1"}, #"Table Y", {"Column1"}, "Table Y", JoinKind.LeftOuter),
    #"Expanded Table Y" = Table.ExpandTableColumn(#"Merged Queries", "Table Y", {"Column1"}, {"Column1.1"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Expanded Table Y",{"Column1.1", "Column2"}),
    #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each ([Column1.1] <> null))
in
    #"Filtered Rows"

// Table Y
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8srPyFPSUXJQitWJVnLJTwWylcFs19zMnEogTwXMc8pPArJVlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}})
in
    #"Changed Type"

Inserte ambos códigos M en el editor avanzado.

Saludos FrankAT

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.