<?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: Data key - value in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1418475#M44329</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this should have no impact how many keys you have for every id as one dataset is distributed on 2 rows and with fill up and down and alternating through the table should always work. The result should be as you were posting in your first post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Br&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jimmy&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2020 13:59:45 GMT</pubDate>
    <dc:creator>Jimmy801</dc:creator>
    <dc:date>2020-10-07T13:59:45Z</dc:date>
    <item>
      <title>Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417720#M44297</link>
      <description>&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;I just started, so hold my hand please. I have 2-3 questions&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a straight forward data, but **bleep** for each ID, in alternate rows are data key and data values&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I did, I pivoted, merged and split now what I have is following columns&lt;/P&gt;&lt;P&gt;For each 1. ID(Repeated n times in rows), 2. Every second row Key (with alternate blank rows) 3. Name of the Key 4. Value with Every alternate row (Null, Null in the row corresponding to Key name, and in next row Value).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please need help to move value column to move up in place of Null for each ID ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have 3 coloumns&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID , Key name,&amp;nbsp; Key value as attached in picture.&amp;nbsp;&lt;/P&gt;&lt;P&gt;as shown in picture ( I will delete the key column).&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 09:41:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417720#M44297</guid>
      <dc:creator>acerNZ</dc:creator>
      <dc:date>2020-10-07T09:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417727#M44298</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="253657" data-lia-user-login="acerNZ" class="lia-mention lia-mention-user"&gt;acerNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post your original table in text format, i.e. just do copy table in Power BI and paste it here. It can tehn be copied easily to run some tests and come up with the solution&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, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&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;</description>
      <pubDate>Wed, 07 Oct 2020 09:45:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417727#M44298</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-10-07T09:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417773#M44300</link>
      <description>&lt;P&gt;Hey AIB Super User,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a ton. Unfortunately, I have some confidential personal data in the reports, and hence created a dummy sample. Please can you help me with this, only thing to take care is I have ID rows going N times different for each ID... all I need is to value column to align in the row of Key name replacing null ( but I will wait for your advice).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 09:55:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417773#M44300</guid>
      <dc:creator>acerNZ</dc:creator>
      <dc:date>2020-10-07T09:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417808#M44304</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="253657" data-lia-user-login="acerNZ" class="lia-mention lia-mention-user"&gt;acerNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste the dummy then please&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, tutoring, etc.&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>Wed, 07 Oct 2020 10:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417808#M44304</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-10-07T10:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417818#M44307</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="253657" data-lia-user-login="acerNZ" class="lia-mention lia-mention-user"&gt;acerNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check out this solution.&lt;/P&gt;
&lt;P&gt;it applies a replace-value to be sure empty strings are replaced with null. Then a Fill-down and a Fill-up is applied. The table is alternated, to keep every second row only&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nQxVNJRCsjIz0sF0kqxOjAhIDIyBAJjQyTB4MScxKJKhcS8vNLEHAz1piamUAEjTDONIGoswABJDIeRUOVmBgZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Type = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"Type", type text}, {"Value", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type","",null,Replacer.ReplaceValue,{"Type", "Value"}),
    #"Filled Down" = Table.FillDown(#"Replaced Value",{"Type"}),
    #"Filled Up" = Table.FillUp(#"Filled Down",{"Value"}),
    #"Removed Alternate Rows" = Table.AlternateRows(#"Filled Up",1,1,1)
in
    #"Removed Alternate Rows"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Copy paste this code to the advanced editor in a new blank query to see how the solution works. &lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt; or &lt;STRONG&gt;solves &lt;/STRONG&gt;your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)&lt;BR /&gt;Kudoes are nice too&lt;BR /&gt;&lt;BR /&gt;Have fun&lt;BR /&gt;&lt;BR /&gt;Jimmy&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 10:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1417818#M44307</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2020-10-07T10:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1418411#M44327</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="160408" data-lia-user-login="Jimmy801" class="lia-mention lia-mention-user"&gt;Jimmy801&lt;/a&gt;&amp;nbsp;Oops my message did not go through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked as charm, on the test file attached. But maybe my mistake, I did not explain it well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My actual data has for each ID, several hundreds of key and values in the next row, next coloumn and pattern is unknown.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I googled and found this&lt;A title="Pivoting to sort out" href="https://youtu.be/V_ULyeHNJFY" target="_self"&gt;&amp;nbsp;https://youtu.be/V_ULyeHNJFY&amp;nbsp; but this too will not work as for my problem&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For each ID ( for each data key, the value is data key [Coloumn +1, Row+1])&lt;/P&gt;&lt;P&gt;I am not sure, how to achieve this.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 13:45:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1418411#M44327</guid>
      <dc:creator>acerNZ</dc:creator>
      <dc:date>2020-10-07T13:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data key - value</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1418475#M44329</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this should have no impact how many keys you have for every id as one dataset is distributed on 2 rows and with fill up and down and alternating through the table should always work. The result should be as you were posting in your first post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Br&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jimmy&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 13:59:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Data-key-value/m-p/1418475#M44329</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2020-10-07T13:59:45Z</dc:date>
    </item>
  </channel>
</rss>

