- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
POWERBI TRANSFORM TABLE TO AN OTHER
Hello,
I'd like to be able to transform table 1 into 2 from the settings table.
Purpose: duplicate the rows of table 1 in order to have all the indices of CCT1 column (here between 1 and 6), which gives table 2.
Thank's a lot
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
it seems that what you want to achieve is basically a cross join parameter table. As in merge there's no cross join the way to achieve this is using a custom column referencing the second table as you can see here:
Cross join - Power Query | Microsoft Learn
Now in your case what you can do to achieve a similar scenario is to create a parameter, for instance maxInt.
Then add a blank query choose your favorite name for instance MyParameterTable and use this M language snippet
let
MyParameterQuery = (MaxInt) => List.Numbers(1,MaxInt)
in
MyParameterQuery
Invoking the function providing parameter value will create the list of value that you need. Default name is Invoked function but you can rename as you prefer. Once you're done with this you can rely on custom column and then expand rows as in following snippet.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXIBYnelWJ1oJScgyxWIPcA8ZyDLDYg9lWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Col1 = _t, Col2 = _t, Col3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Col1", type text}, {"Col2", type text}, {"Col3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #"Invoked Function"),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "Param"}}),
#"Expanded Param" = Table.ExpandListColumn(#"Renamed Columns", "Param")
in
#"Expanded Param"
Hope it helped!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
it seems that what you want to achieve is basically a cross join parameter table. As in merge there's no cross join the way to achieve this is using a custom column referencing the second table as you can see here:
Cross join - Power Query | Microsoft Learn
Now in your case what you can do to achieve a similar scenario is to create a parameter, for instance maxInt.
Then add a blank query choose your favorite name for instance MyParameterTable and use this M language snippet
let
MyParameterQuery = (MaxInt) => List.Numbers(1,MaxInt)
in
MyParameterQuery
Invoking the function providing parameter value will create the list of value that you need. Default name is Invoked function but you can rename as you prefer. Once you're done with this you can rely on custom column and then expand rows as in following snippet.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXIBYnelWJ1oJScgyxWIPcA8ZyDLDYg9lWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Col1 = _t, Col2 = _t, Col3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Col1", type text}, {"Col2", type text}, {"Col3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #"Invoked Function"),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "Param"}}),
#"Expanded Param" = Table.ExpandListColumn(#"Renamed Columns", "Param")
in
#"Expanded Param"
Hope it helped!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Xunh,
Thank you for your reply... BRILLIANT reply, in fact 🙂
Much appreciated
Thank you from the bottom of my heart
Thanks again
Have a great day
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad it helped 🙂
Have a nice weekend!

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

User | Count |
---|---|
9 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |