<?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 run the same code on different columns in the same workflow in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772811#M187617</link>
    <description>&lt;P&gt;If you want do do all columns at once with one formula you probably need to use the transpose tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this challenge very much describes what you need (you can look at peoples solutions):&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.alteryx.com/t5/Weekly-Challenge/Challenge-271-Dynamic-Double-Dip/td-p/769252" target="_blank" rel="noopener"&gt;https://community.alteryx.com/t5/Weekly-Challenge/Challenge-271-Dynamic-Double-Dip/td-p/769252&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you could create a lot of different formulas or do it all at once with a transpose/crosstab before the formula tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 15:16:02 GMT</pubDate>
    <dc:creator>Pingu</dc:creator>
    <dc:date>2021-06-15T15:16:02Z</dc:date>
    <item>
      <title>How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772797#M187610</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to flag warnings for certain conditions for the attached sample data.&lt;/P&gt;&lt;P&gt;For example: issue warning "if C1&amp;lt;1 lasts 1 hour".&lt;/P&gt;&lt;P&gt;However, there are C1....C11 column values in the data.&lt;/P&gt;&lt;P&gt;I calculated running sum total for the rows where C1 &amp;lt; 1 and will check for time equal to or greater than 60 minutes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please tell me how to repeat the same process for other columns optimally?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the sample data and workflow attached for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Pankhudri&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 14:29:26 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772797#M187610</guid>
      <dc:creator>Pankhudri20</dc:creator>
      <dc:date>2021-06-15T14:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772811#M187617</link>
      <description>&lt;P&gt;If you want do do all columns at once with one formula you probably need to use the transpose tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this challenge very much describes what you need (you can look at peoples solutions):&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.alteryx.com/t5/Weekly-Challenge/Challenge-271-Dynamic-Double-Dip/td-p/769252" target="_blank" rel="noopener"&gt;https://community.alteryx.com/t5/Weekly-Challenge/Challenge-271-Dynamic-Double-Dip/td-p/769252&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you could create a lot of different formulas or do it all at once with a transpose/crosstab before the formula tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:16:02 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772811#M187617</guid>
      <dc:creator>Pingu</dc:creator>
      <dc:date>2021-06-15T15:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772823#M187619</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&lt;/P&gt;&lt;P&gt;I have attached the sample data excel file if you want to check my workflow.&lt;/P&gt;&lt;P&gt;I will look at the solutions in the link attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankhudri&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:39:54 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772823#M187619</guid>
      <dc:creator>Pankhudri20</dc:creator>
      <dc:date>2021-06-15T15:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772830#M187621</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/219647"&gt;@Pankhudri20&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a look at your question and think I over-engineered a workflow for your purposes (after looking at what&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/120874"&gt;@Pingu&lt;/a&gt;&amp;nbsp;proposed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are more than welcome to take a look at the workflow (batch macro) that I've put together. It is however not optimal, as I can not get it to batch all the "C"-columns only once. At the moment it works through an average option in the summarize tool, and can definitely be optimized further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best with your workflow!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:55:02 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772830#M187621</guid>
      <dc:creator>jgv27</dc:creator>
      <dc:date>2021-06-15T15:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772938#M187659</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/206407"&gt;@jgv27&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I am unable to download your workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/120874"&gt;@Pingu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very large dataset. I tried transposing but it did not work. Can you tell me how to make this work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankhudri&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 18:10:12 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/772938#M187659</guid>
      <dc:creator>Pankhudri20</dc:creator>
      <dc:date>2021-06-15T18:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773181#M187749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/219647"&gt;@Pankhudri20&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used your workflow as an example to do the same thing for all columns.&lt;/P&gt;&lt;P&gt;I used transpose and then crosstab to put it back in your format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this what you need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 07:21:46 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773181#M187749</guid>
      <dc:creator>Pingu</dc:creator>
      <dc:date>2021-06-16T07:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773406#M187850</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/120874"&gt;@Pingu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your response.&lt;/P&gt;&lt;P&gt;The transpose worked from your workflow.&lt;/P&gt;&lt;P&gt;However, Running Sum Demand is repeating same value for some columns instead of increasing every row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me what logic you applied for calculating that?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankhudri&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 14:40:45 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773406#M187850</guid>
      <dc:creator>Pankhudri20</dc:creator>
      <dc:date>2021-06-16T14:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to run the same code on different columns in the same workflow</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773430#M187863</link>
      <description>&lt;P&gt;I copied your logic and used it in a multi row formula as you can see in the tool:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [Value]=[Row-1:Value] then [Value]+[Row-1:RunningSumDemand]&lt;BR /&gt;else [Value] endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it errors then because with this logic it will only work if all the 1's are after each other like in the example. So it should not compare with previous row but just if the value is if a 0 or 1. And if its a 1 then do +1 for the RunningSumdemand field. If that makes sense.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 15:17:47 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-run-the-same-code-on-different-columns-in-the-same/m-p/773430#M187863</guid>
      <dc:creator>Pingu</dc:creator>
      <dc:date>2021-06-16T15:17:47Z</dc:date>
    </item>
  </channel>
</rss>

