<?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: Expression based on a AutoNumber() does not calculate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1724142#M591866</link>
    <description>&lt;P&gt;You have two good responses on this thread, we would greatly appreciate if you would close out the thread if one or both of those threads helped you solve things by using the Accept as Solution button on the post(s) that helped.&amp;nbsp; This gives the poster credit for the help and lets other Community Members know what the issue was.&amp;nbsp; If you did something else, you can post that and use the button on it to mark that as the solution too.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2020 14:33:31 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-07-01T14:33:31Z</dc:date>
    <item>
      <title>Expression based on a AutoNumber() does not calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708828#M591863</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I needed to do a calculation that requires Quarters to be in a numeric form, so I used in script this formula in the master calendar:&lt;/P&gt;&lt;P&gt;num#(AutoNumber(QuarterName(TempDate))) as Qtr_Key&lt;/P&gt;&lt;P&gt;But when using the Qtr_Key in an expresion I get - .&lt;/P&gt;&lt;P&gt;This is the expresion that I needed Qtr_Key:&lt;/P&gt;&lt;P&gt;&amp;nbsp;if(sum({&amp;lt;Qtr_Key{$(=(Max(Qtr_Key)))}&amp;gt;}(TotalREVENUE-TotalCOST))&amp;lt;0,1,0)+/*q2*/if(sum({&amp;lt;Qtr_Key={$(=(Max(Qtr_Key)-1))}&amp;gt;}(TotalREVENUE-TotalCOST))&amp;lt;0,1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I am trying to calculate if the last 2 quarters have been unprofitable and if so, to add a count on how many of these 2 have been unprofitable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help on why would I get - ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708828#M591863</guid>
      <dc:creator>yzzy2bones</dc:creator>
      <dc:date>2024-11-16T00:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression based on a AutoNumber() does not calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708839#M591864</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you try to replace the num# to num&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems your field is set tot text this is why max function doesn't work&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 16:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708839#M591864</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2020-06-07T16:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Expression based on a AutoNumber() does not calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708841#M591865</link>
      <description>&lt;P&gt;Hi, first create a data table to confirm that Qtr_key is assigned as expected. And in a text box try =Max(Qtr_Key) to confirm that it returns the expected result.&lt;/P&gt;&lt;P&gt;If you use only&amp;nbsp;&lt;EM&gt;sum({&amp;lt;Qtr_Key{$(=(Max(Qtr_Key)))}&amp;gt;}(TotalREVENUE))&lt;/EM&gt;, it returns data? If this works maybe it's beacuse TotalREVENUE and TotalCOST are in different rows, so row by row there will be a null() in the substraction, and number-null()=null()... but in this case the 'if' should be going by the else.&lt;/P&gt;&lt;P&gt;You can use alt o convert nulls to zero:&amp;nbsp;&lt;SPAN&gt;sum({&amp;lt;Qtr_Key{$(=(Max(Qtr_Key)))}&amp;gt;}(Alt(TotalREVENUE,0)-Alt(TotalCOST,0)))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 16:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1708841#M591865</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-06-07T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Expression based on a AutoNumber() does not calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1724142#M591866</link>
      <description>&lt;P&gt;You have two good responses on this thread, we would greatly appreciate if you would close out the thread if one or both of those threads helped you solve things by using the Accept as Solution button on the post(s) that helped.&amp;nbsp; This gives the poster credit for the help and lets other Community Members know what the issue was.&amp;nbsp; If you did something else, you can post that and use the button on it to mark that as the solution too.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 14:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-based-on-a-AutoNumber-does-not-calculate/m-p/1724142#M591866</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-01T14:33:31Z</dc:date>
    </item>
  </channel>
</rss>

