<?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: Set Analysis Expression for Date range - Not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360006#M575998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Did you checked the loaded DateCol field is in dateformat?if not you need to format on loading using Date#().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2012 11:18:35 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2012-04-20T11:18:35Z</dc:date>
    <item>
      <title>Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/359999#M575991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a date filter (2 calendar controls) and I wanted to filter out the data in Pivot based on the date ranges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value for vStartDate &amp;amp; vEndDate can be obtained from the 2 calendar controls (the values are shown as numbers instead of Date format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I issue the following, nothing is being displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Sum({$&amp;lt;DateCol ={"&amp;gt;=$(=Date(vStartDate)) &amp;lt;=$(=Date(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I issue the below code, then the data is populating properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Sum(IF(DateCol &amp;gt;= Date(vStartDate) and DateCol &amp;lt;= Date(vEndDate), Sales_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to QlikView and Set Analysis. I tried putting single quotes and double quotes, but nothing is coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please anyone help. Is expression case sensitive? (Here the case is correct only though)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 14:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/359999#M575991</guid>
      <dc:creator />
      <dc:date>2012-04-19T14:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360000#M575992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;DateCol &lt;/STRONG&gt;={"&amp;gt;=$(&lt;STRONG&gt;vStartDate&lt;/STRONG&gt;)&amp;lt;=$(&lt;STRONG&gt;vEndDate&lt;/STRONG&gt;)"}&lt;STRONG&gt;&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Try the above. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: If this does not work, try creating a new field of DateCol in the same formate as the variables. &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 14:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360000#M575992</guid>
      <dc:creator />
      <dc:date>2012-04-19T14:13:53Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360001#M575993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marc, its working now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({$&amp;lt;DateCol={"&amp;gt;=$(Date(vStartDate))&amp;lt;=$(Date(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Sum({$&amp;lt;DateCol ={"&amp;gt;=$(=Date(vStartDate)) &amp;lt;=$(=Date(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extra = before Date() made the equation not workable... But the Set Analysis was misleading and so I put that = sign &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to &lt;A _jive_internal="true" href="https://community.qlik.com/message/204325#204325"&gt;http://community.qlik.com/message/204325#204325&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 14:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360001#M575993</guid>
      <dc:creator />
      <dc:date>2012-04-19T14:19:39Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360002#M575994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops.. Its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I saw some value in the table, I thought it's working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Date Filter is not working. But if a date is selected from a List box, the values are changing. Else it is showing the same value whatever be the date changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For beautification, I tried putting extra space before &amp;lt;= and it is not returning any value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please? I need it urgently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One quick question. Is set analysis only for Fact data or even for Dimension data. Can we apply the Set analysis for a dimension, so the all the data pertaining to the dimesion is filtered properly? Is that possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 14:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360002#M575994</guid>
      <dc:creator />
      <dc:date>2012-04-19T14:49:15Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360003#M575995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What formats are your variables recording, vs which format is the field DateCol?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the variables are &lt;/P&gt;&lt;P&gt;41017&lt;/P&gt;&lt;P&gt;and the date is&lt;/P&gt;&lt;P&gt;4/18/2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it might cause issues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 14:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360003#M575995</guid>
      <dc:creator />
      <dc:date>2012-04-19T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360004#M575996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Marc, it is same as you have specified. I don't know how to convert the vStartDate to Date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVERT(DateTime,CONVERT(VARCHAR,GETDATE()-5,101)) AS StartDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVERT(DateTime,CONVERT(VARCHAR,GETDATE()-1,101)) AS EndDate&lt;/P&gt;&lt;P&gt;FROM "My_DB".dbo."Dim_Date";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vStartDate = FieldValue('StartDate', 1);&lt;/P&gt;&lt;P&gt;LET vEndDate = FieldValue('EndDate', 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I Reload, it is populating correctly. But after first time, if I change the value in the calendar control, the date values are changing to integer value automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2012 15:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360004#M575996</guid>
      <dc:creator />
      <dc:date>2012-04-19T15:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360005#M575997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion. Atlast it is working. As per your suggestion, I created one more column of the date as integer field and used it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Viola! its working now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateCol2 &lt;/STRONG&gt;={"&amp;gt;=$(&lt;STRONG&gt;vStartDate&lt;/STRONG&gt;)&amp;lt;=$(&lt;STRONG&gt;vEndDate&lt;/STRONG&gt;)"}&lt;STRONG&gt;&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &lt;STRONG&gt;DateCol2&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt; is an integer column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;CONVERT(INT,DateCol) AS DateCol2&lt;/STRONG&gt;&lt;/SPAN&gt;,*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;FROM "BK_DB".dbo."Dim_Date";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;But, I really wonder why &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateCol ={"&amp;gt;=$(Date(vStartDate))&amp;lt;=$(Date(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;is not working, though both are in Date format only &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to specify special formatting like "MM/DD/YYYY" inside date function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sigh.... Let me try and post the output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Edit: Oops... Its not working with date format....&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 07:19:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360005#M575997</guid>
      <dc:creator />
      <dc:date>2012-04-20T07:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360006#M575998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Did you checked the loaded DateCol field is in dateformat?if not you need to format on loading using Date#().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 11:18:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360006#M575998</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-20T11:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360007#M575999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;DateCol &lt;/STRONG&gt;&lt;/SPAN&gt;shows &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;M/D/YYYY hh:mm:ss AM/PM&lt;/STRONG&gt;&lt;/SPAN&gt; value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as you see in the above code, I am converting the &lt;STRONG style="color: #ff0000;"&gt;StartDate&lt;/STRONG&gt; &amp;amp; &lt;STRONG style="color: #ff0000;"&gt;EndDate &lt;/STRONG&gt;to DateTime format only which will also return in the above said format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything said, the filter starts showing different values when I change the date filter, but the value showing is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please anyone let me know how to achieve what I am expecting - I need YOY &amp;amp; YTD in 2 grids&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 11:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360007#M575999</guid>
      <dc:creator />
      <dc:date>2012-04-20T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360008#M576000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Its in timestamp format.Check with this.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;=Sum({&amp;lt;DateCol ={"&amp;gt;=$(=TimeStamp(vStartDate))&amp;lt;=$(=TimeStamp(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;Celambarasan&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 11:56:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360008#M576000</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-20T11:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360009#M576001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantabulous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot Celambu / Adhi, it works like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a separate documentation for various conversions &amp;amp; formatting. I am very new to QlikView, working for past few days only. Please guide me to learn QlikView quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick question: Can we include another year in the same expression for YOY comparison. I am achieving this now through 2 IFs as mentioned in my initial post (and this is working correctly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF((DateCol &amp;gt;= Date(vStartDate) and DateCol &amp;lt;= Date(vEndDate)) or (DateCol &amp;gt;= AddYears(Date(vStartDate),-1) and DateCol &amp;lt;= AddYears(Date(vEndDate),-1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to achieve YOY &amp;amp; YTD in the grid. Can you please guide me. Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360009#M576001</guid>
      <dc:creator />
      <dc:date>2012-04-20T12:24:50Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360010#M576002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Simply use this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-size: 12px;"&gt;=Sum({&amp;lt;DateCol ={"&amp;gt;=$(=TimeStamp(AddYears(vStartDate,-1)))&amp;lt;=$(=TimeStamp(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;Qlikview help file and this community is enough to learn Qlikview.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;Celambarasan&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360010#M576002</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-20T12:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360011#M576003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. Is this a separate column or in the same column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main reason I am asking this is, in my previous query I wrote a single expression and just dragged the year dimension and it populates Sales for both the years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like that is there any way where I can specify AND / OR conditions inside an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: I have created another Measure for YOY - previous year and removed the year dimension and its working fine.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales (CY):&lt;/STRONG&gt; =Sum({&amp;lt;DateCol ={"&amp;gt;=$(=TimeStamp(vStartDate))&amp;lt;=$(=TimeStamp(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales (PY): &lt;/STRONG&gt;=Sum({&amp;lt;DateCol ={"&amp;gt;=$(=TimeStamp(AddYears(vStartDate,-1)))&amp;lt;=$(=TimeStamp(AddYears(vEndDate,-1)))"}&amp;gt;} Sales_Amount)&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360011#M576003</guid>
      <dc:creator />
      <dc:date>2012-04-20T12:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360012#M576004</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;&lt;STRONG style="font-size: 12px;"&gt;=Sum({&amp;lt;DateCol ={"&amp;gt;=$(=TimeStamp(AddYears(vStartDate,-1)))&amp;lt;=$(=TimeStamp(vEndDate))"}&amp;gt;} Sales_Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Above expression itself work like your expression&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;IF((DateCol &amp;gt;= Date(vStartDate) and DateCol &amp;lt;= Date(vEndDate)) or (DateCol &amp;gt;= AddYears(Date(vStartDate),-1) and DateCol &amp;lt;= AddYears(Date(vEndDate),-1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;for both the years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360012#M576004</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-20T12:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360013#M576005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The query is partially right. The thing is if we give a date range like &lt;STRONG style="color: #ff0000;"&gt;Apr 1st to Apr 5th&lt;/STRONG&gt;, then it is taking the date range as&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Apr 1st 2011 till Apr 5th 2012&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Apr 1st 2011 to Apr 5th 2011&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Apr 1st 2012 to Apr 5th 2012&lt;/STRONG&gt;&lt;/SPAN&gt;. I dont want the data between &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;5th Apr 2011&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Mar 31st 2012&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #000000;"&gt;Hence I achieved as I mentioned in my above post. Thanks, you have given an insight of how to arrive, which is very helpful &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;Any specific doc or link for formatting and conversions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 12:55:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360013#M576005</guid>
      <dc:creator />
      <dc:date>2012-04-20T12:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Expression for Date range - Not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360014#M576006</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 want to achieve this. Can you please help me? I don't want the greyed out portion as it displays only zeros. Can we achieve through Set Analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="YOY.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/13214_YOY.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 13:18:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Expression-for-Date-range-Not-working/m-p/360014#M576006</guid>
      <dc:creator />
      <dc:date>2012-04-20T13:18:09Z</dc:date>
    </item>
  </channel>
</rss>

