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
Anonymous
Not applicable

Cómo multiplicar Tabla con tabla en Power BI

Hola

¿Puede explicar cómo podemos multiplicar cada fila de la Tabla 2 con la Tabla 1? ¿Así que podemos lograr la tabla 3?

Ahmet_Oz_0-1597156115446.png

Gracias

saludos

Ahmet

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ahmet_Oz , Crossjoin

Junta cruzada(Tabla1, Tabla2)

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hola, @Ahmet_Oz

Puede lograr sus requisitos en 'Editor de consultas' o Power BI Desktop. Creé datos para reproducir su escenario. El archivo pbix se adjunta al final.

Tabla1:

c1.png

Tabla 2:

c2.png

En 'Editor de consultas', puede duplicar la consulta 'Tabla1', quitar la columna 'Apellido', agregar una columna personalizada y, a continuación, expandir la columna con listas.

c3.png

Aquí hay códigos en 'Advanced Editor'.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkgsyixW0lFyrFKK1YlW8srPyAPy/CG84JLUtEQQ3xPIjwUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Surname = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Surname", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Surname"}),
    Custom1 = Table.AddColumn(#"Removed Columns","Title",each Table2[Title]),
    #"Expanded Title" = Table.ExpandListColumn(Custom1, "Title")
in
    #"Expanded Title"

Resultado:

c4.png

En Power BI Desktop, puede crear una tabla calculada como se muestra a continuación.

Table = 
CROSSJOIN(
   DISTINCT('Table2'[Title]),
   DISTINCT(Table1[Name])
)

Resultado:

c5.png

Saludos

Allan

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

amitchandak
Super User
Super User

@Ahmet_Oz , Crossjoin

Junta cruzada(Tabla1, Tabla2)

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.