<?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: Summing multiple if statements in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648752#M129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, so the variables can be populated from the calendar and time listbox. If you are interested in only some qvd files then create a listbox for the QVD_Id field and select those values you're interested in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use your complicated if statements expressions instead take a look at the rangesum function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Sep 2014 12:25:48 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-09-19T12:25:48Z</dc:date>
    <item>
      <title>Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648749#M126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're using this expression =if(IsNull(TimeStamp(Max({$&amp;lt;QVD_Id={10}&amp;gt;}Updated))), 0, 1) to check if a report has been updated in a given time interval. We'd like to plot the values in a line chart. This expression only checks one report, namely where the QVD ID is equal to 10. We have 10 other reports with QVD IDs ranging from 2 to 20 and we'd like to summarize all the results in the if statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any easier way to do this than to do the calculations below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(=if(IsNull(TimeStamp(Max({$&amp;lt;QVD_Id={10}&amp;gt;}Updated))), 0, 1)) + =if(IsNull(TimeStamp(Max({$&amp;lt;QVD_Id={2}&amp;gt;}Updated))), 0, 1) + ... =if(IsNull(TimeStamp(Max({$&amp;lt;QVD_Id={20}&amp;gt;}Updated))), 0, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you guys can help. Appreciate it!! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 11:06:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648749#M126</guid>
      <dc:creator />
      <dc:date>2014-09-19T11:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648750#M127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this perhaps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count({&amp;lt;Update={'&amp;gt;=$(vTimeIntervalStart)&amp;lt;=$(vTimeIntervalEnd)'}&amp;gt;} distinct QVD_Id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTimeIntervalStart and vTimeIntervalEnd would be two variables to enter the start and end of the time interval. Then it's simply a matter of counting the distinct number of QVD_Id's that have an Update time value between that start and end time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 11:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648750#M127</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-09-19T11:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648751#M128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should have been mentioned in the question, however our report sheet contains a calendar and time list box so that users can select their time interval. We also have more QVD IDs (more than 10) but will only be using specific QVD IDs, not all. As an example, we have a list of QVD_IDs:list1={ 2, 10,11,14,15,20} that we are interested in, but the complete list of QVD_IDs contains more values. We already know that the expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=if(IsNull(TimeStamp(Max({$&amp;lt;QVD_Id={10}&amp;gt;}Updated))), 0, 1) returns 0 if the report (with QVD_ID=10) has not been updated in the chosen time interval, and returns 1 if the report has been updated. If it is possible, we therefore want to use this statement but make a sum of the the results for all the reports in list1, yielding ex. 5 if five of the reports successfully uploaded in the specified time interval.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 12:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648751#M128</guid>
      <dc:creator />
      <dc:date>2014-09-19T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648752#M129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, so the variables can be populated from the calendar and time listbox. If you are interested in only some qvd files then create a listbox for the QVD_Id field and select those values you're interested in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use your complicated if statements expressions instead take a look at the rangesum function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 12:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648752#M129</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-09-19T12:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648753#M130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 12:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648753#M130</guid>
      <dc:creator />
      <dc:date>2014-09-19T12:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple if statements</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648754#M131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again for your answer. We are quite new to QlikView so we weren't familiar with what all the different expression can do. However, we ended up following your suggestion to use the count function and used this expression below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=count({$&amp;lt; QVD_Id = {2, 9, 10, 11, 13, 15, 17, 18, 19, 20}&amp;gt;}DISTINCT QVD_Id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In short, we were successful in terms of &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; yielding the correct results for day. However, when selecting week or month from the cyclic group we would like to get results that shows the total sum of successfully updated reports for each week/month. We have posted another question in the community (under title, "Summing count function in cyclic group") regarding this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks again for the help&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 07:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/Summing-multiple-if-statements/m-p/648754#M131</guid>
      <dc:creator />
      <dc:date>2014-09-23T07:25:16Z</dc:date>
    </item>
  </channel>
</rss>

