<?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 Set analysis : Dates comparaison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369006#M1172530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I uploaded data in a QV tables :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- 'Calls' with the following fields : C_call_id, C_creation_date, C_finish_date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I created 1 QV object :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- a simple table (T1) with the following dimensions : C_call_id, C_creation_date, C_finish_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table T1 I added the following set analysis as expression&lt;/P&gt;&lt;P&gt;SA1 : &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_creation_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_finish_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}C_call_id) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the whole callid that have creation date equal to finish date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatly, it doesn't work : I get no line at all in my table T1&lt;/P&gt;&lt;P&gt;Could you please tell me how I can correct my set analysis to get what I want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2012 09:08:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-26T09:08:12Z</dc:date>
    <item>
      <title>Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369006#M1172530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I uploaded data in a QV tables :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- 'Calls' with the following fields : C_call_id, C_creation_date, C_finish_date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I created 1 QV object :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- a simple table (T1) with the following dimensions : C_call_id, C_creation_date, C_finish_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table T1 I added the following set analysis as expression&lt;/P&gt;&lt;P&gt;SA1 : &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_creation_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_finish_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}C_call_id) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the whole callid that have creation date equal to finish date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatly, it doesn't work : I get no line at all in my table T1&lt;/P&gt;&lt;P&gt;Could you please tell me how I can correct my set analysis to get what I want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 09:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369006#M1172530</guid>
      <dc:creator />
      <dc:date>2012-07-26T09:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369007#M1172531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;try like: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;Count( if( C_creation_date=C_finish_date,C_call_id,0 ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;This is asuming that both the date fields are not date and time fileds. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;Best of luck!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;R&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 09:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369007#M1172531</guid>
      <dc:creator />
      <dc:date>2012-07-26T09:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369008#M1172532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pascal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure this one can do your job. But let try&lt;/P&gt;&lt;P&gt;1. Count({&amp;lt;C_creation_date = {"=$(=C_finish_date)"} C_call_id)&lt;/P&gt;&lt;P&gt;2. IF(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_creation_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C_finish_date,COUNT(C_call_id)&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 09:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369008#M1172532</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2012-07-26T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369009#M1172533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry but it doesn't work.&lt;/P&gt;&lt;P&gt;I'm surprising because it systematically gives me 1 (for the whole Callid) even if the creation date and the finish date are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's certainly, as you mean, because my two fileds are dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 13:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369009#M1172533</guid>
      <dc:creator />
      <dc:date>2012-07-26T13:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369010#M1172534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; color: #636363; font-family: Arial;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; color: #636363; font-family: Arial;"&gt;({&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 11px; background-color: #eef4f9;"&gt;C_call_id&lt;/SPAN&gt;={"=&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; font-family: Arial; color: #800000;"&gt;C_creation_date&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; color: #636363; font-family: Arial;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; font-family: Arial; color: #800000;"&gt;C_finish_date"}&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 8pt; color: #636363; font-family: Arial;"&gt;&amp;gt;}C_call_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 13:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369010#M1172534</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-07-26T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369011#M1172535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Sorry but the first solution doesn't work (I get no lines).&lt;/P&gt;&lt;P&gt;2. The second solution works : it gives 1 for every callid where the creation date is equal to the finish date but... since it not a set analysis the total is not equal to the sum of '1' occurences (I get a '-' instead). It is really important for me to work with a set analysis because I need to get the total number of calls with same dates later in my QV application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 14:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369011#M1172535</guid>
      <dc:creator />
      <dc:date>2012-07-26T14:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369012#M1172537</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;Have a look at the attached solution. It doesn't use set analysis, which I don't think will work in this scenario: a call creation date can match many call finish dates on different rows: the row based solution gives coherent results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Azam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;=======&lt;/P&gt;&lt;P&gt;Thinking about it some more, a set based analysis could be achived like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a 4the field in T1 called C_call_duration, which is the difference in days between C_creation_date and C_finish_date, then you can select the set where C_call_Duration is 0:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count ( {$ &amp;lt;C_call_duration = {0}&amp;gt; } C_call_id)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 15:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369012#M1172537</guid>
      <dc:creator>a_mullick</dc:creator>
      <dc:date>2012-07-26T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis : Dates comparaison</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369013#M1172539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pascal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got your point. AGGR() function may do this job. Below is the alternative solution&lt;/P&gt;&lt;P&gt;1. SUM(IF(C_creation_date=C_finish_date,COUNT(C_call_id)))&lt;/P&gt;&lt;P&gt;2. SUM(AGGR(IF(C_creation_date=C_finish_date,COUNT(C_call_id)),C_creation_date))&lt;/P&gt;&lt;P&gt;3. SUM(IF(C_creation_date=C_finish_date,1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will be easy, if you can share your app. We look into it together to find a good solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 11:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Dates-comparaison/m-p/369013#M1172539</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2012-07-27T11:48:49Z</dc:date>
    </item>
  </channel>
</rss>

