<?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: Several tests on same field in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470771#M486341</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Sum(If(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;FASTTRACK_SENT_NUM &amp;lt;= FASTTRACK_DUE_NUM,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; count ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;FASTTRACK_SENT_NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;gt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), -12)))&amp;lt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), 0)))'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;COUNTER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) ))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Mar 2013 07:27:32 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2013-03-23T07:27:32Z</dc:date>
    <item>
      <title>Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470770#M486340</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;I have this set analysis that works fine and select records with FASTTRACK_SENT_NUM within the last 12 months:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;count ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;FASTTRACK_SENT_NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;gt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), -12)))&amp;lt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), 0)))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;COUNTER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;My problem is that I need another test on the field FASTTRACK_SENT_NUM in this set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In addition to the test above I also need to select records where FASTTRACK_SENT_NUM &amp;lt;= FASTTRACK_DUE_NUM.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Both FASTTRACK_SENT_NUM and FASTTRACK_DUE_NUM are date-fields converted to numeric format in the load script and they have exactly the same format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How will the set analysis look like after including this extra test?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Torunn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 21:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470770#M486340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-22T21:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470771#M486341</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Sum(If(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;FASTTRACK_SENT_NUM &amp;lt;= FASTTRACK_DUE_NUM,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; count ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;FASTTRACK_SENT_NUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;gt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), -12)))&amp;lt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), 0)))'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;COUNTER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) ))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 07:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470771#M486341</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-03-23T07:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470772#M486342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all thank you for responding on my problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your suggestion, but I don't get this to work.&amp;nbsp; I do only get ' - ' as the result in the column.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if you have som other suggestions that I can try?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Torunn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 10:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470772#M486342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-23T10:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470773#M486343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try: &lt;/P&gt;&lt;P&gt;count ({$&amp;lt;FASTTRACK_SENT_NUM= {"=FASTTRACK_SENT_NUM&amp;lt;=FASTTRACK_DUE_NUM"},&lt;/P&gt;&lt;P&gt;FASTTRACK_SENT_NUM={'&amp;gt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), -12)))&amp;lt;$(=NUM(AddMonths(makedate($(vYear),$(vMonth),1), 0)))'}&amp;gt;}COUNTER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If both date fields are in the same table, you could add a field to flag if &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FASTTRACK_SENT_NUM &amp;lt;= FASTTRACK_DUE_NUM&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FASTTRACK_SENT_NUM &amp;lt;= FASTTRACK_DUE_NUM&lt;/SPAN&gt;, 1, 0) as fFTSentBeforeDue. Then you can simply use the new field in your set analysis expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share a &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1290"&gt;sample document&lt;/A&gt;? You can upload files by clicking on the &lt;SPAN style="padding-top: 3px; color: #636363; font-size: 0.9em; background-color: #ffffff; font-family: Arial;"&gt;&lt;EM&gt;Use advanced editor&lt;/EM&gt;&lt;/SPAN&gt; link after you click on the Reply button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: changed the first expression so it returns a result. But better use the flag field&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 10:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470773#M486343</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-23T10:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470774#M486344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your suggestion and I do now get ' 0 ' as the result of the expression.&amp;nbsp;&amp;nbsp; I know there are records that should match the expression.&amp;nbsp; Do you have any more ideas that I could try?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Torunn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 11:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470774#M486344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-23T11:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470775#M486345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hei Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not attach the total qvw because this is a part of a big model, but I have made a small qvw with the fields you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My need is to count number of records (%Quote_id) with "fast-track-sent" last month and check how many that was sent within "fast-track-due" that month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the table I need in the qvw.&amp;nbsp; Note that the source-data includes records for several months and that is why the expression needs several tests on the field "fast-track-sent".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope the attached file can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Torunn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 12:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470775#M486345</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-23T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470776#M486346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're best off with calculating a flag field in the script. See attached qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 12:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470776#M486346</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-23T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Several tests on same field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470777#M486347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's a lot Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I shall do as you suggest and calculate a flag field in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Torunn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 12:53:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Several-tests-on-same-field-in-set-analysis/m-p/470777#M486347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-23T12:53:04Z</dc:date>
    </item>
  </channel>
</rss>

