<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power Query help in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545907#M77366</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for assisting. i forgot there's another column that has to go onto it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please assist again ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Power query help 2" href="https://interwaste-my.sharepoint.com/:x:/g/personal/vincent_interwaste_co_nz/EQ90a7KhFJtJkoN9HU2ZYkUB6SWbd1vzDQySv5PrNdqKOw?e=ETUzyN" target="_self"&gt;Power query help 2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, do i have to add to 'Data model' before i can use the power query editor ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried going into advance editor but there's no data to select.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 May 2022 10:11:32 GMT</pubDate>
    <dc:creator>VincenzoChean</dc:creator>
    <dc:date>2022-05-29T10:11:32Z</dc:date>
    <item>
      <title>Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545684#M77362</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how i can convert this using power query or from excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The header is on the 1st column, it organize in a weekly fashion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The spreadsheet was not designed by me. But i need import the data into PBI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://interwaste-my.sharepoint.com/:x:/g/personal/vincent_interwaste_co_nz/EQ90a7KhFJtJkoN9HU2ZYkUB6SWbd1vzDQySv5PrNdqKOw?e=WYV7R1" target="_self"&gt;spreadsheet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 23:52:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545684#M77362</guid>
      <dc:creator>VincenzoChean</dc:creator>
      <dc:date>2022-05-28T23:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545811#M77363</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380545" data-lia-user-login="VincenzoChean" class="lia-mention lia-mention-user"&gt;VincenzoChean&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;please paste the following code into the advanced editor and follow the steps:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows2" = Table.SelectRows(Source, each ([Column1] &amp;lt;&amp;gt; null)),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows2", "Week", each if Text.StartsWith([Column1], "Week ") then [Column1] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Week"}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Filled Down", [PromoteAllScalars=true]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Week 1", "Week 1_1"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "Date"}}),
    #"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each not Text.StartsWith([Week 1], "Week ")),
    #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each ([Value] &amp;lt;&amp;gt; "")),
    #"Renamed Columns1" = Table.RenameColumns(#"Filtered Rows1",{{"Week 1", "Row"}, {"Week 1_1", "Week"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns1",{{"Value", type number}})
in
    #"Changed Type1"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File also attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 05:21:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545811#M77363</guid>
      <dc:creator>ImkeF</dc:creator>
      <dc:date>2022-05-29T05:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545907#M77366</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for assisting. i forgot there's another column that has to go onto it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please assist again ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Power query help 2" href="https://interwaste-my.sharepoint.com/:x:/g/personal/vincent_interwaste_co_nz/EQ90a7KhFJtJkoN9HU2ZYkUB6SWbd1vzDQySv5PrNdqKOw?e=ETUzyN" target="_self"&gt;Power query help 2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, do i have to add to 'Data model' before i can use the power query editor ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried going into advance editor but there's no data to select.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 10:11:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545907#M77366</guid>
      <dc:creator>VincenzoChean</dc:creator>
      <dc:date>2022-05-29T10:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545973#M77369</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380545" data-lia-user-login="VincenzoChean" class="lia-mention lia-mention-user"&gt;VincenzoChean&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;will there always only be 7 columns with dates or could there be more or less? (This is relevant for how to determine the columns that shall be unpivoted.)&lt;BR /&gt;With regards to the m-code, in this video I show how to use code from the internet and paste it into the advanced editor:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=vjfeZojshxQ" target="_blank"&gt;Dynamically solve parent child hierarchies in Power BI and Power Query - YouTube&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 12:44:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545973#M77369</guid>
      <dc:creator>ImkeF</dc:creator>
      <dc:date>2022-05-29T12:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545987#M77370</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Yes it will be. Thanks a lot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 12:58:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2545987#M77370</guid>
      <dc:creator>VincenzoChean</dc:creator>
      <dc:date>2022-05-29T12:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546013#M77371</link>
      <description>&lt;P&gt;Good, so you add the category-field to the unpivot others step:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filtered Rows2" = Table.SelectRows(Source, each ([Column1] &amp;lt;&amp;gt; null)),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows2", "Week", each if Text.StartsWith([Column1], "Week ") then [Column1] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Week"}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Filled Down", [PromoteAllScalars=true]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Week 1", "Week 1_1", "category"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "Date"}}),
    #"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each not Text.StartsWith([Week 1], "Week ")),
    #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each ([Value] &amp;lt;&amp;gt; "")),
    #"Renamed Columns1" = Table.RenameColumns(#"Filtered Rows1",{{"Week 1", "Row"}, {"Week 1_1", "Week"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns1",{{"Value", type number}, {"category", type text}})
in
    #"Changed Type1"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 14:09:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546013#M77371</guid>
      <dc:creator>ImkeF</dc:creator>
      <dc:date>2022-05-29T14:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546046#M77373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380545" data-lia-user-login="VincenzoChean" class="lia-mention lia-mention-user"&gt;VincenzoChean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below transformation code should be dynamic enough to turn the data into structured data formate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Get Source&lt;/FONT&gt;&lt;BR /&gt;Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Unpivot other column other than the first one (i.e. week1,2, column)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Column1"}, "Attribute", "Value"),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Add conditional column to get "Week", then fill down&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;#"Added Custom1" = Table.AddColumn(#"Unpivoted Other Columns", "Custom", each if Text.StartsWith([Column1],"Week") then [Column1] else null),&lt;BR /&gt;#"Filled Down" = Table.FillDown(#"Added Custom1",{"Custom"}),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Filter for only the header rows&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ColumnTbl = Table.SelectRows(#"Filled Down", each Text.StartsWith([Column1],"Week")),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Filter for all row except header rows&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;NonColumnTbl = Table.SelectRows(#"Filled Down", each not Text.StartsWith([Column1],"Week")),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Join the main table (the content without header) with header table to get table&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;#"Merged Queries" = Table.NestedJoin(NonColumnTbl, {"Custom", "Attribute"}, ColumnTbl, {"Custom", "Attribute"}, "NonColumnTbl", JoinKind.LeftOuter),&lt;BR /&gt;#"Expanded NonColumnTbl" = Table.ExpandTableColumn(#"Merged Queries", "NonColumnTbl", {"Value"}, {"Date"}),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Rename header (rename to whatever name you want)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;#"Renamed Columns" = Table.RenameColumns(#"Expanded NonColumnTbl",{{"Column1", "Measure / Title"}, {"Custom", "Week Number"}}),&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;//Remove access columns&lt;/FONT&gt;&lt;BR /&gt;#"Removed Columns1" = Table.RemoveColumns(#"Renamed Columns",{"Attribute"})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;in&lt;BR /&gt;#"Removed Columns1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KT&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 15:14:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546046#M77373</guid>
      <dc:creator>KT_Bsmart2gethe</dc:creator>
      <dc:date>2022-05-29T15:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546550#M77388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380545" data-lia-user-login="VincenzoChean" class="lia-mention lia-mention-user"&gt;VincenzoChean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just realised that you have attached the source file.&lt;/P&gt;&lt;P&gt;See below link for the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/drive/folders/1MccgsWTIsMD1UgxjyPXuk1M99lvA-Npz?usp=sharing" target="_self"&gt;Solution&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KT&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 04:29:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546550#M77388</guid>
      <dc:creator>KT_Bsmart2gethe</dc:creator>
      <dc:date>2022-05-30T04:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power Query help</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546566#M77389</link>
      <description>&lt;LI-CODE lang="cpp"&gt;= Table.Combine(Table.Group(Source,"Column1",{"n",each let a=Table.PromoteHeaders(Table.SelectRows(_,each [Column1]&amp;lt;&amp;gt;null)),b=Table.UnpivotOtherColumns(a,List.RemoveRange(Table.ColumnNames(a),1,7),"Date","x") in Table.RenameColumns(Table.Pivot(b,List.Distinct(Table.ToColumns(b){0}),Table.ColumnNames(b){0},"x"),{{"dates","category"}},1)},0,(x,y)=&amp;gt;Byte.From(Text.StartsWith(y??"","Week ")))[n])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 04:49:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Power-Query-help/m-p/2546566#M77389</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-05-30T04:49:08Z</dc:date>
    </item>
  </channel>
</rss>

