<?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 Comparing dates in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768923#M661448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my Expression looks like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg({&amp;lt;PurchaseDate&amp;lt;=2015-01-15&amp;gt;}Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you can see I have a Date column (PurchaseDate) and a simple date 2015-01-15&lt;/P&gt;&lt;P&gt;in sql i would simply :&lt;/P&gt;&lt;P&gt;PurchaseDate &amp;lt;= convert(datetime,'2015-01-15',suitable Style)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2015 06:07:36 GMT</pubDate>
    <dc:creator>arixooo123</dc:creator>
    <dc:date>2015-02-23T06:07:36Z</dc:date>
    <item>
      <title>Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768923#M661448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my Expression looks like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg({&amp;lt;PurchaseDate&amp;lt;=2015-01-15&amp;gt;}Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you can see I have a Date column (PurchaseDate) and a simple date 2015-01-15&lt;/P&gt;&lt;P&gt;in sql i would simply :&lt;/P&gt;&lt;P&gt;PurchaseDate &amp;lt;= convert(datetime,'2015-01-15',suitable Style)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 06:07:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768923#M661448</guid>
      <dc:creator>arixooo123</dc:creator>
      <dc:date>2015-02-23T06:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768924#M661450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({&amp;lt;PurchaseDate = {'&amp;lt;=2015-01-15'} &amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use it dynamically also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 06:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768924#M661450</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-02-23T06:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768925#M661451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;set vCompareDate=Date('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2015-01-15','YYYY-MM-DD')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;avg({&amp;lt;PurchaseDate={"&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vCompareDate)&lt;/SPAN&gt;"}&amp;gt;}Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Make sure both the dates are in same format&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 06:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768925#M661451</guid>
      <dc:creator>manojkulkarni</dc:creator>
      <dc:date>2015-02-23T06:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768926#M661452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your set analysis syntax is incorrect. Please try below expression&lt;/P&gt;&lt;P&gt;avg({&amp;lt;PurchaseDate = {'&amp;lt;=2015-01-15'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Greeshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 06:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768926#M661452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-23T06:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768927#M661454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;if you want to compare a field value with a specific date or variable then use code like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;set vCompareDate=Date('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2015-01-15','YYYY-MM-DD')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;avg({&amp;lt;PurchaseDate={"&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vCompareDate)&lt;/SPAN&gt;"}&amp;gt;}Sale)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;----------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if you are facing problem then covert the date into number format then use (num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PurchaseDate&lt;/SPAN&gt;)).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;set vCompareDate=num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2015-01-15','YYYY-MM-DD'))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;avg({&amp;lt;PurchaseDate={"&amp;lt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vCompareDate)&lt;/SPAN&gt;"}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vimlesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 06:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768927#M661454</guid>
      <dc:creator />
      <dc:date>2015-02-23T06:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768928#M661455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the above expression does not work, i don't know why. &lt;/P&gt;&lt;P&gt;but, what if i try this? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;avg({&amp;lt;Year(PurchaseDate)&amp;lt;2015,Month(PurchaseDate)&amp;lt;1&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;it is like in sql i try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;where &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;datepart(year,PurchaseDate)&amp;lt;2015 and DatePart(Month,PurchaseDate)&amp;lt;1 &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 08:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-dates-in-set-analysis/m-p/768928#M661455</guid>
      <dc:creator>arixooo123</dc:creator>
      <dc:date>2015-02-23T08:01:34Z</dc:date>
    </item>
  </channel>
</rss>

