<?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: Date range in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012675#M343439</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the variables contains strings and not dates. You can use the date# function in the set analysis expression like Tamil Nagaraj shows above. Or you can do it in the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the orderdate field contains dates with the default document date format. You used MM/DD/YYYY to turn the text string into a date, but it will not necessarily get that date format. If in the script the DateFormat variable is set with for example SET DateFormat='DD-MM-YYYY'; then your date# function will create dates with the DD-MM-YYYY format. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2016 08:00:50 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-03-17T08:00:50Z</dc:date>
    <item>
      <title>Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012667#M343431</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;/P&gt;&lt;P&gt;I am trying to achieve the below expression in Set Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only( If(OrderDate &amp;gt;= $(vMinDate) AND OrderDate&amp;nbsp; &amp;lt;= $(vMaxDate), OrderID) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OrderDate field is a Date format ('YYYY-MM-DD').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;J. Ravichandra Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012667#M343431</guid>
      <dc:creator>rjn</dc:creator>
      <dc:date>2016-03-17T07:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012668#M343432</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;Hi,&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;Check below expression&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;&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;=Only({&amp;lt;OrderDate = {"&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)"}&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012668#M343432</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-03-17T07:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012669#M343433</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;If OrderDate is really a date field and not a text field then something like this should work:&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;=Only({&amp;lt;OrderDate={'&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)'}&amp;gt;} OrderID)&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;If it doesn't then you need to check if OrderDate really contains dates. Use the Date# function in the script as necessary to make dates from text strings.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:21:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012669#M343433</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-17T07:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012670#M343434</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;The OrderDate is a Date field and the results are not showing up when used&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;Only({&amp;lt;OrderDate={'&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)'}&amp;gt;} OrderID)&lt;/SPAN&gt; and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;Only({&amp;lt;OrderDate={"&amp;gt;=$(vMinDate)&amp;lt;=$(vMaxDate)"}&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;vMinDate and vMaxDate are variables and has values, but unable to view any records in the Stright Table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;J. Ravichandra Kumar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:31:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012670#M343434</guid>
      <dc:creator>rjn</dc:creator>
      <dc:date>2016-03-17T07:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012671#M343435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post vMinDate and vMaxDate values.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012671#M343435</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-03-17T07:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012672#M343436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the expressions in the variables? Perhaps you should change them so the return numbers only or dates in the format of the OrderDate field. Can you post a small qlikview document that demonstrates the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012672#M343436</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-17T07:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012673#M343437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vMinDate = '01/02/2014'&lt;BR /&gt;vMaxDate = '01/13/2016'&lt;/P&gt;&lt;P&gt;OrderDate field contains dates between the above range and format is 'MM/DD/YYYY' (used Date# function)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012673#M343437</guid>
      <dc:creator>rjn</dc:creator>
      <dc:date>2016-03-17T07:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012674#M343438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can specify the vMinDate and vMaxDate format in set expression.&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;=Only({&amp;lt;OrderDate = {"&amp;gt;=Date(Date#($(vMinDate),'&lt;STRONG style="color: #ff0000;"&gt;YourFormat&lt;/STRONG&gt;'),'YYYY-MM-DD')&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(Date#(&lt;/SPAN&gt;$(vMaxDate)&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,'&lt;/SPAN&gt;&lt;STRONG style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;YourFormat&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'),'YYYY-MM-DD')&lt;/SPAN&gt;"}&amp;gt;} OrderID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012674#M343438</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-03-17T07:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012675#M343439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the variables contains strings and not dates. You can use the date# function in the set analysis expression like Tamil Nagaraj shows above. Or you can do it in the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the orderdate field contains dates with the default document date format. You used MM/DD/YYYY to turn the text string into a date, but it will not necessarily get that date format. If in the script the DateFormat variable is set with for example SET DateFormat='DD-MM-YYYY'; then your date# function will create dates with the DD-MM-YYYY format. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 08:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012675#M343439</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-17T08:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012676#M343440</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;Hi Tamil Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support, the issue is fixed. There was a null in the OrderDate field due to which the Set Analysis was not working, but its fixed and working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;J. Ravichandra Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 10:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-Set-Analysis/m-p/1012676#M343440</guid>
      <dc:creator>rjn</dc:creator>
      <dc:date>2016-03-18T10:25:54Z</dc:date>
    </item>
  </channel>
</rss>

