Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
I have data like this :
Column1 | Column 2 | Column 3
a d g
b e h
c f i
I want this :
a d g
a e g
a f g
a d h
a e h
a f h
a d i
a e i
a f i
b d g
b e g
...
...
Is it possible in Power BI? (or excel)
Thanks !
Solved! Go to Solution.
Easy Cartesian product regardless of count of columns, for instance, 4 columns
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
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Easy Cartesian product regardless of count of columns, for instance, 4 columns
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
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 78 | |
| 48 | |
| 35 | |
| 31 | |
| 27 |