<?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: Skipping Certain Calculations when Multiple Values are Null in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/687479#M162575</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/151721"&gt;@dishamishra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a workflow that I believe follows the logic you are trying to apply. Let us know if you were thinking something different. I wrote to a new field instead of updating the Value column for presentation sake. I used the field category to control when I'm calculating the Current Ratio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was the function I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [Category] = 'Current Ratio' and !isnull([Row-1:Value]) and !isnull([Row-2:Value]) then (([Row-2:Value]/[Row-1:Value])*-1) else null() endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pedrodrfaria_0-1609442311777.png" style="width: 400px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/152391i5A3BCD044A7156B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pedrodrfaria_0-1609442311777.png" alt="pedrodrfaria_0-1609442311777.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark the discussion post as completed and assign an answer to the post (this helps us all). Feel free to reach out if you need additional help. We recommend to open a new discussion post if you have a different question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pedro.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2020 19:22:52 GMT</pubDate>
    <dc:creator>pedrodrfaria</dc:creator>
    <dc:date>2020-12-31T19:22:52Z</dc:date>
    <item>
      <title>Skipping Certain Calculations when Multiple Values are Null</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/682770#M161335</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi there Alteryx Community!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a workflow where I am&amp;nbsp;&lt;STRONG&gt;adding extra columns to the output if certain dates do not exist&amp;nbsp;in the source file&lt;/STRONG&gt;. When I try to calculate a ratio using a&amp;nbsp;&lt;STRONG&gt;multi-field row tool&lt;/STRONG&gt;, I would like the formula to skip over the null fields. I was wondering if someone could take a look at my formula and let me know what I'm doing wrong? Here are some screenshots:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt;&amp;nbsp;If you take a look at row 33 ... Jan_20 is a column which does not exist in the source file, but I have added it to the workflow so that my final output will have all the years from Jan_18 to Jan_20. I would like this "Current Ratio" calculation to remain null for Jan_20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alteryx 1.jpg" style="width: 822px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/150347i713EA4863A7023DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alteryx 1.jpg" alt="alteryx 1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt;&amp;nbsp;If you take a look at the "Expression" ... I am trying to come up with a formula that will calculate the "Current Ratio" by dividing Row-2[Value] with Row-1[Value], but I want that formula to ignore those situations where there is no value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="formula 2.jpg" style="width: 607px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/150348iE7F81BD8CF992E07/image-size/large?v=v2&amp;amp;px=999" role="button" title="formula 2.jpg" alt="formula 2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments/ideas would be greatly appreciated!&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 02:50:19 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/682770#M161335</guid>
      <dc:creator>dishamishra</dc:creator>
      <dc:date>2020-12-19T02:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Skipping Certain Calculations when Multiple Values are Null</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/687380#M162548</link>
      <description>&lt;P&gt;row 33 is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;formula says if row 33 is null and row 32 is null, which they are, then use row 33, which is null.&amp;nbsp; not quite sure what you're trying to accomplish.&amp;nbsp; maybe some more examples would help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 12:31:59 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/687380#M162548</guid>
      <dc:creator>mbarone</dc:creator>
      <dc:date>2020-12-31T12:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Skipping Certain Calculations when Multiple Values are Null</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/687479#M162575</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/151721"&gt;@dishamishra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a workflow that I believe follows the logic you are trying to apply. Let us know if you were thinking something different. I wrote to a new field instead of updating the Value column for presentation sake. I used the field category to control when I'm calculating the Current Ratio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was the function I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [Category] = 'Current Ratio' and !isnull([Row-1:Value]) and !isnull([Row-2:Value]) then (([Row-2:Value]/[Row-1:Value])*-1) else null() endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pedrodrfaria_0-1609442311777.png" style="width: 400px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/152391i5A3BCD044A7156B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pedrodrfaria_0-1609442311777.png" alt="pedrodrfaria_0-1609442311777.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark the discussion post as completed and assign an answer to the post (this helps us all). Feel free to reach out if you need additional help. We recommend to open a new discussion post if you have a different question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pedro.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 19:22:52 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Skipping-Certain-Calculations-when-Multiple-Values-are-Null/m-p/687479#M162575</guid>
      <dc:creator>pedrodrfaria</dc:creator>
      <dc:date>2020-12-31T19:22:52Z</dc:date>
    </item>
  </channel>
</rss>

