<?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: Get forms data into structured lines in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839190#M28107</link>
    <description>&lt;P&gt;Something like this (substitute YourTable with your table name):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = YourTable,
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Questions", type text}, {"Answers", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Questions"}, {{"Rows", each [Answers], type {text}}}),
    #"Transposed Table" = Table.Transpose(#"Grouped Rows"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Id", type any}, {"Question 1", type any}, {"Question 2", type any}, {"Question 3", type any}}),
    Custom1 = Table.FromRows(List.Zip(Record.FieldValues(#"Changed Type1"{0})), Table.ColumnNames(#"Changed Type1"))
in
    Custom1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 23:07:17 GMT</pubDate>
    <dc:creator>artemus</dc:creator>
    <dc:date>2019-11-06T23:07:17Z</dc:date>
    <item>
      <title>Get forms data into structured lines</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839100#M28104</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is an exemple of what I have :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&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t;&lt;TD&gt;Question1&lt;/TD&gt;&lt;TD&gt;Question2&lt;/TD&gt;&lt;TD&gt;Question3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 20:38:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839100#M28104</guid>
      <dc:creator>NumeroENAP</dc:creator>
      <dc:date>2019-11-06T20:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get forms data into structured lines</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839188#M28106</link>
      <description>&lt;P&gt;Presuming that you are power querying in excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Questions", type text}, {"Answers", type any}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "ID", each if [Questions] = "Id" then [Answers] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"ID"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Questions] &amp;lt;&amp;gt; "Id")),
    #"Pivoted Column" = Table.Pivot(#"Filtered Rows", List.Distinct(#"Filtered Rows"[Questions]), "Questions", "Answers", List.Min)
in
    #"Pivoted Column"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Nov 2019 23:05:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839188#M28106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-06T23:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get forms data into structured lines</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839190#M28107</link>
      <description>&lt;P&gt;Something like this (substitute YourTable with your table name):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = YourTable,
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Questions", type text}, {"Answers", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Questions"}, {{"Rows", each [Answers], type {text}}}),
    #"Transposed Table" = Table.Transpose(#"Grouped Rows"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Id", type any}, {"Question 1", type any}, {"Question 2", type any}, {"Question 3", type any}}),
    Custom1 = Table.FromRows(List.Zip(Record.FieldValues(#"Changed Type1"{0})), Table.ColumnNames(#"Changed Type1"))
in
    Custom1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 23:07:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/839190#M28107</guid>
      <dc:creator>artemus</dc:creator>
      <dc:date>2019-11-06T23:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get forms data into structured lines</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/840031#M28145</link>
      <description>&lt;P&gt;You're a genius angel. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 15:39:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/840031#M28145</guid>
      <dc:creator>NumeroENAP</dc:creator>
      <dc:date>2019-11-07T15:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get forms data into structured lines</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/840153#M28147</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="62590" data-lia-user-login="artemus" class="lia-mention lia-mention-user"&gt;artemus&lt;/a&gt;.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;very interesting solution, I did not even think into this direction.&lt;/P&gt;&lt;P&gt;I think you can slightly modify it to something like this to reduce compute-greedy transformations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let 
    Source=...    
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Questions", type text}, {"Answers", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Questions"}, {{"Rows", each [Answers], type {text}}}),
    Output = Table.FromColumns(#"Grouped Rows"[Rows], #"Grouped Rows"[Questions])
in
    Output&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 17:35:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-forms-data-into-structured-lines/m-p/840153#M28147</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T17:35:10Z</dc:date>
    </item>
  </channel>
</rss>

