title: Excel Power Query Advanced Editor breaking code into steps
body: <p>I was creating a new query in power query and opened advanced editor to tweak one of the steps. The query works fine but all the steps have disappeared from the "Applied Steps" menu on the right and merged into a single step.</p>
  
  <p>How do I break these into small steps again (which is a lot simpler to understand and troubleshoot)?</p>
  
  <p>Does this happen every time the advanced editor is used?</p>
  
  <p>My code below. Can I somehow have each line show as a separate step in the "applied steps" menu on the right?</p>
  
  <pre><code>let
  
      Source = Excel.CurrentWorkbook(){[Name="FlagsAllClients"]}[Content],
      #"Changed Type" = Table.TransformColumnTypes(Source,{{"Portfolio Manager", type text}, {"Client ID", type text}, {"Client Name", type text}, {"KE", type text}, {"Portfolio ID", type text}, {"Days Out", Int64.Type}, {"Risk Category", type text}, {"Risk", type text}, {"Tracking Error", type text}, {"Concentration", type text}, {"Sector", type text}, {"Buy-List", type text}, {"Max Hld Wt", type text}, {"Anom. Hldgs", type text}, {"Concentration Issuer", type text}, {"Portfolio Value", type number}, {"Date", type datetime}}),
  
      #"Merged Queries" = Table.NestedJoin(#"Changed Type",{"Portfolio Manager"},BD_Office,{"BG"},"BD_Office",JoinKind.LeftOuter),
      #"Expanded BD_Office" = Table.ExpandTableColumn(#"Merged Queries", "BD_Office", {"Team"}, {"BD_Office.Team"}),
      #"Merged Queries1" = Table.NestedJoin(#"Expanded BD_Office",{"Client ID"},FlagsT,{"Client ID"},"FlagsT",JoinKind.LeftOuter),
      #"Expanded FlagsT" = Table.ExpandTableColumn(#"Merged Queries1", "FlagsT", {"Risk", "Sector", "Buy-List", "Max Hld Wt"}, {"FlagsT.Risk", "FlagsT.Sector", "FlagsT.Buy-List", "FlagsT.Max Hld Wt"}),
      #"Merged Queries2" = Table.NestedJoin(#"Expanded FlagsT",{"Client ID"},FlagsT_1,{"Client ID"},"FlagsT_1",JoinKind.LeftOuter),
      #"Expanded FlagsT_1" = Table.ExpandTableColumn(#"Merged Queries2", "FlagsT_1", {"Risk", "Sector", "Buy-List", "Max Hld Wt"}, {"FlagsT_1.Risk", "FlagsT_1.Sector", "FlagsT_1.Buy-List", "FlagsT_1.Max Hld Wt"}),
      #"Removed Other Columns" = Table.SelectColumns(#"Expanded FlagsT_1",{"Portfolio Manager", "Client ID", "Client Name", "KE", "Portfolio Value", "BD_Office.Team", "FlagsT.Risk", "FlagsT.Sector", "FlagsT.Buy-List", "FlagsT.Max Hld Wt", "FlagsT_1.Risk", "FlagsT_1.Sector", "FlagsT_1.Buy-List", "FlagsT_1.Max Hld Wt"}),
      #"Reordered Columns" = Table.ReorderColumns(#"Removed Other Columns",{"BD_Office.Team", "Portfolio Manager", "Client ID", "Client Name", "KE", "Portfolio Value", "FlagsT.Risk", "FlagsT.Sector", "FlagsT.Buy-List", "FlagsT.Max Hld Wt", "FlagsT_1.Risk", "FlagsT_1.Sector", "FlagsT_1.Buy-List", "FlagsT_1.Max Hld Wt"}),
      #"Replaced Value" = Table.ReplaceValue(#"Reordered Columns","X","1",Replacer.ReplaceValue,{"FlagsT.Risk","FlagsT.Sector","FlagsT.Buy-List","FlagsT.Max Hld Wt","FlagsT_1.Risk","FlagsT_1.Sector","FlagsT_1.Buy-List","FlagsT_1.Max Hld Wt"}),
      #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","!","0",Replacer.ReplaceText,{"FlagsT.Risk","FlagsT.Sector","FlagsT.Buy-List","FlagsT.Max Hld Wt","FlagsT_1.Risk","FlagsT_1.Sector","FlagsT_1.Buy-List","FlagsT_1.Max Hld Wt"}),
      #"Replaced Value2" = Table.ReplaceValue(#"Replaced Value","2","0",Replacer.ReplaceText,{"FlagsT.Risk","FlagsT.Sector","FlagsT.Buy-List","FlagsT.Max Hld Wt","FlagsT_1.Risk","FlagsT_1.Sector","FlagsT_1.Buy-List","FlagsT_1.Max Hld Wt"})
  
  in
  
      #"Replaced Value1"
  </code></pre>