<?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: Pivot table dates in multiple rows in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119165#M36734</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp; mentioned, I think you need to upload your excel file, because when I view original data in Power Query, it can't show correctly (it will prompt error of can't find excel path). You could directly copy Excel content and paste this&amp;nbsp; in forum or you also could try to&amp;nbsp;upload virtual data, then I could try to reproduce your problem.&lt;/P&gt;
&lt;P&gt;Please do mask sensitive data before uploading.&lt;/P&gt;
&lt;P&gt;Thanks for your understanding and support.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 09:22:55 GMT</pubDate>
    <dc:creator>dax</dc:creator>
    <dc:date>2020-05-26T09:22:55Z</dc:date>
    <item>
      <title>Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1117553#M36701</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi all,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have an excell query that look like this example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am tyring to figure&amp;nbsp; out how to transform&amp;nbsp;data so that the table looked something like this:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SKU&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;25/05/2020&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;any help on this is really appreciated&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reuben&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 09:52:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1117553#M36701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-25T09:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1117965#M36706</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide a sample data ?&lt;/P&gt;&lt;P&gt;We can create a m-code and share it with you.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 12:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1117965#M36706</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-05-25T12:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1118732#M36725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You could refer to below M code to see whether it work or not&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fY9LCoAgEEDvMuvAcWz6nKFltBI3iqsO0PVLTcYgBMHnQ31qLVwxnkQwACGhYkXc8NTwDG6wsG/H496RhPe+rAirCiE8qItmzO57KEdNvXxSWpAETa9oUk6jFEo1Sa47f6KjXL8Irs1TsFed32BOS7X8Pc/O3Q==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Column1] &amp;lt;&amp;gt; "" and [Column1] &amp;lt;&amp;gt; "SKU")),
    #"Transposed Table" = Table.Transpose(#"Filtered Rows"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {}, "Attribute", "Value"),
    #"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "Custom", each if Text.Contains([Attribute], "week") then [Value] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"}),
    #"Filtered Rows1" = Table.SelectRows(#"Filled Down", each not Text.Contains([Attribute], "week")),
    #"Extracted Text Before Delimiter" = Table.TransformColumns(#"Filtered Rows1", {{"Attribute", each Text.BeforeDelimiter(_, "_"), type text}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Extracted Text Before Delimiter",{{"Attribute", type text}, {"Value", Int64.Type}, {"Custom", type date}})
in
    #"Changed Type1"&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 05:10:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1118732#M36725</guid>
      <dc:creator>dax</dc:creator>
      <dc:date>2020-05-26T05:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119000#M36730</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="119281" data-lia-user-login="dax" class="lia-mention lia-mention-user"&gt;dax&lt;/a&gt;&amp;nbsp; for you help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to replicate your M code in my model, but it seems that I'm missing a step somewhere that makes not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/f00wqiizkmerat9/Forecast.pbix?dl=0" target="_self"&gt;https://www.dropbox.com/s/f00wqiizkmerat9/Forecast.pbix?dl=0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much&lt;/P&gt;&lt;P&gt;Reuben&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 07:51:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119000#M36730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-26T07:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119068#M36731</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;the file you've attached doesn't show the source data because it is reading from your local folder. Can you paste here the source data (in txt-tabular format, so that it can be copied)? And what is it exactly in&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="119281" data-lia-user-login="dax" class="lia-mention lia-mention-user"&gt;dax&lt;/a&gt;&amp;nbsp;&amp;nbsp;approach that is not working??&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:57:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119068#M36731</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-05-26T09:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119165#M36734</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp; mentioned, I think you need to upload your excel file, because when I view original data in Power Query, it can't show correctly (it will prompt error of can't find excel path). You could directly copy Excel content and paste this&amp;nbsp; in forum or you also could try to&amp;nbsp;upload virtual data, then I could try to reproduce your problem.&lt;/P&gt;
&lt;P&gt;Please do mask sensitive data before uploading.&lt;/P&gt;
&lt;P&gt;Thanks for your understanding and support.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:22:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1119165#M36734</guid>
      <dc:creator>dax</dc:creator>
      <dc:date>2020-05-26T09:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1120232#M36752</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that the data was visible in the pbix file, sorry for that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is that I simplified my original table to facilitate the job and to make it easier to understand what I needed to do. So when I went back to my original table, with a couple of columns more, I dindnt know how to replicate the M code. Here is my original table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/hgl1vgvmwgqc1sz8tqpdp/Forecast2.xlsx?dl=0&amp;amp;rlkey=irehvx3a78r0okct0x8mzm647" target="_blank"&gt;https://www.dropbox.com/scl/fi/hgl1vgvmwgqc1sz8tqpdp/Forecast2.xlsx?dl=0&amp;amp;rlkey=irehvx3a78r0okct0x8mzm647&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to give a little more details, the table is a weekly production forecast, where&lt;/P&gt;&lt;P&gt;Line1, Line2 = Production Lines&lt;/P&gt;&lt;P&gt;SKU : Item&lt;/P&gt;&lt;P&gt;Description: Item description -&amp;gt; It can be omited from the table&lt;/P&gt;&lt;P&gt;Form: weight of the item - &amp;gt; It can be omited from the table&lt;/P&gt;&lt;P&gt;And for each day, the expected production quantity&lt;/P&gt;&lt;P&gt;I hope it help&lt;/P&gt;&lt;P&gt;Thank you all for helping me&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 12:31:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1120232#M36752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-26T12:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1121870#M36798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think it will be difficult to modify multiple tables in the same sheet, you could try save them in the different sheets or convert them into pivot tables(make sure they have the same column name, type and data structure ), the you could invoke function to transform it easily in M code. Below is my sample and I change something in&amp;nbsp; your sample. You also could refer to&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2018/07/09/power-bi-combine-multiple-excel-worksheets/" target="_self"&gt;https://blog.crossjoin.co.uk/2018/07/09/power-bi-combine-multiple-excel-worksheets/&lt;/A&gt;&amp;nbsp; for details.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:06:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1121870#M36798</guid>
      <dc:creator>dax</dc:creator>
      <dc:date>2020-05-27T09:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1123526#M36823</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check if this file helps:&amp;nbsp;&lt;A title="PBIX" href="https://drive.google.com/file/d/1E8z_beWuE_ws57KlZK2oRFpscDavmnom/view?usp=sharing" target="_blank" rel="noopener"&gt;Download PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 14:09:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1123526#M36823</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-05-27T14:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table dates in multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1123670#M36831</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="215853" data-lia-user-login="camargos88" class="lia-mention lia-mention-user"&gt;camargos88&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;Awsome solution! besides I have learnt how to use Table.Group function. Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="119281" data-lia-user-login="dax" class="lia-mention lia-mention-user"&gt;dax&lt;/a&gt;&amp;nbsp;too for your approach. I has been very useful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks both!!&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 15:09:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Pivot-table-dates-in-multiple-rows/m-p/1123670#M36831</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-27T15:09:26Z</dc:date>
    </item>
  </channel>
</rss>

