<?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 AW:Set analysis syntax problem with dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219394#M72423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have got the same problem, but how can I egalize the date formats ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a delivery Date, which is simply a number with a length of 7 or 8 chars (f.e. 1102010=01.10.2010 , 10102010=10.10.2010),&lt;/P&gt;&lt;P&gt;so I convert it:&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(LEN(DELIVERY_DATE)=7,DATE(DATE#('0'&amp;amp;DELIVERY_DATE,'DDMMYYYY')),DATE(DATE#(DELIVERY_DATE,'DDMMYYYY'))) &lt;B&gt;AS&lt;/B&gt; DELIVERY_DATE,&lt;/P&gt;&lt;P&gt;And I have got a BESTBEFORE_DATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE(DATE#(BESTBEFORE_DATE,'DDMMYY')) &lt;B&gt;AS&lt;/B&gt; BESTBEFORE_DATE,&lt;/P&gt;&lt;P&gt;Both dates appear in the same format .... but obviously they aren't.&lt;/P&gt;&lt;P&gt;My set analysis works fine with:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=SUM({$&amp;lt;DELIVERY_DATE={"&amp;gt;$(=TODAY(0))"}&amp;gt;}AMOUNT)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;AND THE IF-EXPRESSION IS WORKING, TOO&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=SUM(IF(DELIVERY_DATE&amp;lt;BESTBEFORE_DATE,AMOUNT))&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Apr 2010 10:05:46 GMT</pubDate>
    <dc:creator>ManuelRühl</dc:creator>
    <dc:date>2010-04-21T10:05:46Z</dc:date>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219388#M72417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my 8.5 SR3 application, I've a date field used for selections only (that is to say an autogenerate field not linked to anything else) : DATE_MAX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my chart I'd like to write an expression which calculate a sum of sales where the date field DATE_OPERATION &amp;lt;= DATE_MAX selected.&lt;/P&gt;&lt;P&gt;It should be something like :&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;DATE_OPERATION={"&amp;lt;=$(=max(DATE_MAX))"}&amp;gt;}SALES)&lt;/P&gt;&lt;P&gt;but it doesn't work (even in V9 version).&lt;/P&gt;&lt;P&gt;Do you see where is the error in my expression ?&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 13:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219388#M72417</guid>
      <dc:creator />
      <dc:date>2010-04-20T13:40:12Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219389#M72418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible that you're trying to expand an incorrect expression? Try this:&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;DATE_OPERATION={"&amp;lt;=max(&lt;B&gt;$(DATE_MAX)&lt;/B&gt;)"}&amp;gt;}SALES)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 13:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219389#M72418</guid>
      <dc:creator />
      <dc:date>2010-04-20T13:46:22Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219390#M72419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bertrand,&lt;/P&gt;&lt;P&gt;Your expression seems fine to me. The only think I can think of is that your DATE_OPERATION and DATE_MAX fields date format differ, so you don't get any results. Is that possible? Does that expression work fine with an if() statement instead of the set analysis?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 15:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219390#M72419</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-04-20T15:14:50Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219391#M72420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read it again; my previous suggestion doesn't have sense. I think that Miguel is in the correct way. Try using Date with the same format for both dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 16:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219391#M72420</guid>
      <dc:creator />
      <dc:date>2010-04-20T16:38:00Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219392#M72421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your answer,&lt;/P&gt;&lt;P&gt;I finally made it, but now I'm fighting to do the same type of formula but with an =&lt;/P&gt;&lt;P&gt;that is to say&lt;/P&gt;&lt;P&gt;DATE_1 = DATE_2 value :&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;DATE_1={DATE_2}&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;Do you know how to write it correctly ?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 17:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219392#M72421</guid>
      <dc:creator />
      <dc:date>2010-04-20T17:27:06Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219393#M72422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so DATE_1 and DATE_2 have no connections, direct or indirect. You want to select a set of values in DATE_2, and then have the system behave like you instead selected those values in DATE_1? I think this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;DATE_1=DATE_2&amp;gt;} SALES)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 00:18:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219393#M72422</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-21T00:18:56Z</dc:date>
    </item>
    <item>
      <title>AW:Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219394#M72423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have got the same problem, but how can I egalize the date formats ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a delivery Date, which is simply a number with a length of 7 or 8 chars (f.e. 1102010=01.10.2010 , 10102010=10.10.2010),&lt;/P&gt;&lt;P&gt;so I convert it:&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(LEN(DELIVERY_DATE)=7,DATE(DATE#('0'&amp;amp;DELIVERY_DATE,'DDMMYYYY')),DATE(DATE#(DELIVERY_DATE,'DDMMYYYY'))) &lt;B&gt;AS&lt;/B&gt; DELIVERY_DATE,&lt;/P&gt;&lt;P&gt;And I have got a BESTBEFORE_DATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE(DATE#(BESTBEFORE_DATE,'DDMMYY')) &lt;B&gt;AS&lt;/B&gt; BESTBEFORE_DATE,&lt;/P&gt;&lt;P&gt;Both dates appear in the same format .... but obviously they aren't.&lt;/P&gt;&lt;P&gt;My set analysis works fine with:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=SUM({$&amp;lt;DELIVERY_DATE={"&amp;gt;$(=TODAY(0))"}&amp;gt;}AMOUNT)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;AND THE IF-EXPRESSION IS WORKING, TOO&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=SUM(IF(DELIVERY_DATE&amp;lt;BESTBEFORE_DATE,AMOUNT))&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219394#M72423</guid>
      <dc:creator>ManuelRühl</dc:creator>
      <dc:date>2010-04-21T10:05:46Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219395#M72424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for your suggestion,&lt;/P&gt;&lt;P&gt;for my first question, I put the following expression in a variable :&lt;/P&gt;&lt;P&gt;&lt;B&gt;V_DATE : DATE_OPERATION&lt;/B&gt;={'&amp;lt;=$(=max([DATE_MAX]))'}&lt;/P&gt;&lt;P&gt;and then in my expression I wrote :&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;$(V_DATE)&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;and now it seems to works (I not really see the difference except using ' instead of " ??)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my second question (Date with = ) I'm gonna write another post with a little example. because I think my case is a bit more complex.&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 17:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem-with-dates/m-p/219395#M72424</guid>
      <dc:creator />
      <dc:date>2010-04-21T17:56:13Z</dc:date>
    </item>
  </channel>
</rss>

