Home > OS >  Power query - m language failing to show advanced editor steps
Power query - m language failing to show advanced editor steps

Time:11-27

I was creating applied steps in Power Query when I use advanced editor towards the end of my work to apply the same exact steps.

From Split Column by delimiter8 was the start of using advanced editor.

The problem is my final table when I refresh, only shows Column 10 with Order Items 10.1, Order Quantity 10.2 and Order Price 10.3. When it should apply the same principle to Order Items 6 to 10. See image below. Ideally I want to see 6.1 / 6.2 / 6.3 /7.1 / 7.2 / 7.3 repeat to 10.

Can you help me? I will respond as soon as I can to any replies.

Table Lay out

My code is below -

 #"Changed Type16" = Table.TransformColumnTypes(#"Split Column by Delimiter8",{{"Order Items.6.1", type text}, {"Order Items.6.2", Int64.Type}, {"Order Items.6.3", Int64.Type}}),
    #"Renamed Columns10" = Table.RenameColumns(#"Changed Type16",{{"Order Items.6.2", "Order Quantity.6.2"}, {"Order Items.6.3", "Order Price.6.3"}}),
    #"Changed Type17" = Table.TransformColumnTypes(#"Renamed Columns10",{{"Order Price.6.3", Currency.Type}}),
    #"Split Column by Delimiter9" = Table.SplitColumn(#"Changed Type15", "Order Items.7", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), {"Order Items.7.1", "Order Items.7.2", "Order Items.7.3"}),
    #"Renamed Columns11" = Table.RenameColumns(#"Split Column by Delimiter9",{{"Order Items.7.2", "Order Quantity.7.2"}, {"Order Items.7.3", "Order Price.7.3"}}),
    #"Changed Type18" = Table.TransformColumnTypes(#"Renamed Columns11",{{"Order Quantity.7.2", Int64.Type}, {"Order Price.7.3", Currency.Type}}),
    #"Split Column by Delimiter10" = Table.SplitColumn(#"Changed Type15", "Order Items.8", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), {"Order Items.8.1", "Order Items.8.2", "Order Items.8.3"}),
    #"Renamed Columns12" = Table.RenameColumns(#"Split Column by Delimiter10",{{"Order Items.8.2", "Order Quantity.8.2"}, {"Order Items.8.3", "Order Price.8.3"}}),
    #"Changed Type19" = Table.TransformColumnTypes(#"Renamed Columns12",{{"Order Quantity.8.2", Int64.Type}, {"Order Price.8.3", Currency.Type}}),
    #"Split Column by Delimiter11" = Table.SplitColumn(#"Changed Type15", "Order Items.9", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), {"Order Items.9.1", "Order Items.9.2", "Order Items.9.3"}),
    #"Renamed Columns13" = Table.RenameColumns(#"Split Column by Delimiter11",{{"Order Items.9.2", "Order Quantity.9.2"}, {"Order Items.9.3", "Order Price.9.3"}}),
    #"Changed Type20" = Table.TransformColumnTypes(#"Renamed Columns13",{{"Order Quantity.9.2", Int64.Type}, {"Order Price.9.3", Currency.Type}}),
    #"Split Column by Delimiter12" = Table.SplitColumn(#"Changed Type15", "Order Items.10", Splitter.SplitTextByDelimiter(":", QuoteStyle.Csv), {"Order Items.10.1", "Order Items.10.2", "Order Items.10.3"}),
    #"Renamed Columns14" = Table.RenameColumns(#"Split Column by Delimiter12",{{"Order Items.10.2", "Order Quantity.10.2"}, {"Order Items.10.3", "Order Price.10.3"}}),
    #"Changed Type21" = Table.TransformColumnTypes(#"Renamed Columns14",{{"Order Quantity.10.2", Int64.Type}, {"Order Price.10.3", Currency.Type}})

CodePudding user response:

This is because you reference the same step #"Changed Type15" everywhere and all intermediate results are simply overwritten. When you look at the first steps - which you are not showing here - every line depends on the preceding one.

  • Related