<?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: How to generate new rows from a formula? in Alteryx Designer Cloud Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131733#M1065</link>
    <description>&lt;P&gt;Awesome answer thanks! &lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 21:04:29 GMT</pubDate>
    <dc:creator>IraWatt</dc:creator>
    <dc:date>2022-05-23T21:04:29Z</dc:date>
    <item>
      <title>How to generate new rows from a formula?</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131731#M1063</link>
      <description>&lt;P&gt;If I have a dataset of people which has 1 row per person. how do I then write a formula to generate 3 rows for each person with values 1,2,3 for each person?&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 20:32:19 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131731#M1063</guid>
      <dc:creator>IraWatt</dc:creator>
      <dc:date>2022-05-22T20:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate new rows from a formula?</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131732#M1064</link>
      <description>&lt;P&gt;Hi Ira,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the Unpivot transformation to achieve this. In short, Unpivot converts selected columns into rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically, here's what you can do:&lt;/P&gt;&lt;P&gt;1- Add three columns in your recipe with the values 1, 2, and 3. Here, a column is created with value "1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- Use the Unpivot transformation to move the three newly-created columns into rows. Since you want to convert the three numbers into rows, select the three columns.&lt;/P&gt;&lt;P&gt;3- Remember to delete the "key" column if you don't want it, and rename the "value" column accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 17:15:07 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131732#M1064</guid>
      <dc:creator>JWang_Tri</dc:creator>
      <dc:date>2022-05-23T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate new rows from a formula?</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131733#M1065</link>
      <description>&lt;P&gt;Awesome answer thanks! &lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 21:04:29 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131733#M1065</guid>
      <dc:creator>IraWatt</dc:creator>
      <dc:date>2022-05-23T21:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate new rows from a formula?</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131734#M1066</link>
      <description>&lt;P&gt;Awesome answer thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 21:04:39 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131734#M1066</guid>
      <dc:creator>IraWatt</dc:creator>
      <dc:date>2022-05-23T21:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate new rows from a formula?</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131735#M1067</link>
      <description>&lt;P&gt;Hi @Ira Watt?&amp;nbsp;, thank you for your question!&lt;/P&gt;&lt;P&gt;While there's already an answer to your scenario, allow me to add another way to achieve the desired output.&lt;/P&gt;&lt;P&gt;This solution will also be scalable no matter how many records you want to create out of a single row - as it will always require only 2 steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first step would be to use the RANGE() function:&lt;/P&gt;&lt;P&gt;This function returns an array of integers sequenced between two values by a step size&lt;/P&gt;&lt;P&gt;I've created an array that starts at 1 (inclusive) and ends at 4 (exclusive), with a step size of 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second step would be to use the flatten transform on the array column; this can be done by clicking the columns' header and using Trifacta's suggestions:&lt;/P&gt;&lt;P&gt;The Flatten transform converts an array to rows so that each element is extracted to its own record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is another way to add as many rows as needed for each record.&lt;/P&gt;&lt;P&gt;Notice that the original column value has the "to be dropped" notion in the preview; it will be replaced with the flattened column; meaning you don't need to delete the column afterwards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that makes sense; Please feel free to ask any additional questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 13:36:02 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Cloud-Discussions/How-to-generate-new-rows-from-a-formula/m-p/1131735#M1067</guid>
      <dc:creator>AMiller_Tri</dc:creator>
      <dc:date>2022-05-25T13:36:02Z</dc:date>
    </item>
  </channel>
</rss>

