Forum Discussion
Muniz_Felipe
1 year agoFrequent Visitor
Crossjoin lists in Power Query
Hello! I have two lists: one with the months, from 1 to 12 and other with 5 years, from 2021 to 2025. My idea is to build a small table with all the months in one column and each row in the se...
- 1 year ago
I've just found out I can do that by using List.Repeat with one of my lists. For example, in the formula below I used List.Repeat to repeat the year list 12 times, one for each month. And then the function Table.FromColumns transformed my two lists into a table.
Now, if I expand the column2, I'll have my crossjoined lists in Power Query.
Muniz_Felipe
1 year agoFrequent Visitor
I've just found out I can do that by using List.Repeat with one of my lists. For example, in the formula below I used List.Repeat to repeat the year list 12 times, one for each month. And then the function Table.FromColumns transformed my two lists into a table.
Now, if I expand the column2, I'll have my crossjoined lists in Power Query.