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.
Hola
Tengo datos como este:
Columna1 | Columna 2 | Columna 3
a d g
b y h
c f i
Quiero esto:
a d g
a y g
a f g
a d h
a y h
a f h
a d i
a e i
a f i
b d g
b y g
...
...
¿Es posible en Power BI? (o Excel)
¡Gracias!
Solved! Go to Solution.
Producto cartesiano fácil independientemente del recuento de columnas, por ejemplo, 4 columnas
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoB4nQgzlKK1YlWSgKyUoE4A4izwSLJQFYaEGcCcY5SbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
Cols = Table.ToColumns(Source),
Cartesian = Table.FromRows(
List.Accumulate(List.Skip(Cols), List.Transform(Cols{0}, each {_}),(s,c) => List.TransformMany(s, each c, (x,y) => x & {y}))
)
in
Cartesian
Producto cartesiano fácil independientemente del recuento de columnas, por ejemplo, 4 columnas
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoB4nQgzlKK1YlWSgKyUoE4A4izwSLJQFYaEGcCcY5SbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
Cols = Table.ToColumns(Source),
Cartesian = Table.FromRows(
List.Accumulate(List.Skip(Cols), List.Transform(Cols{0}, each {_}),(s,c) => List.TransformMany(s, each c, (x,y) => x & {y}))
)
in
Cartesian
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |