<?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: Selecting Date Range w/Persistent Variables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303722#M1179620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you, I actually found a way to do it via a bookmark. I included a search box and bookmarked the results of these searches:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;=update_date&amp;gt;now()-7 &lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Cambria','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Cambria','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;=update_date&amp;gt;now()-91&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works beautifully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Jan 2012 20:56:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-29T20:56:42Z</dc:date>
    <item>
      <title>Selecting Date Range w/Persistent Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303718#M1179616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The objective is to get a dynamic date range that goes back 13 weeks (91 days) from today's date, and to use that functionality in order to select the corresponding records in a field. I'd rather the users not be required to calculate what the date was 91 days ago each day in a calendar object, either. What I'm looking for is a way to do it via a load/where statement or just a simple button or bookmark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field containing a list of dates (update_date). The qvw pulls data from a consistently updated SQL database, so there's always a value for today's date. Is there a way to use the expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;Today()-0&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;Today()-91&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;easily to achieve this? Or is there another way to do this? I've spent ~30 hours the past three days browsing this forum but have only found solutions where the user must manually enter the dates. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 21:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303718#M1179616</guid>
      <dc:creator />
      <dc:date>2012-01-24T21:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting Date Range w/Persistent Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303719#M1179617</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;If what you want to do is make the selection simpler for the user, by means of a button, for example, create a button, go to its properties, Actions tab, add a new action type Selection, Select in Field, set update_date as field and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=Date(Today() -91)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the search string. Make sure using a text object that this function returns in the same format that your update_date field is. You can also set this action to be triggered when the document opens (Settings menu, Triggers tab, On Open event) or when a sheet is activated (right click on any empty space of the current sheet, Properties).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to load only those records where update_date equals to that date, you can do that using a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LET vDate = Date(Today() -91);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Table WHERE update_date &amp;gt;= '$(vDate)';&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provided as above that the update_date and the result of '$(vDate)' are in the same format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 22:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303719#M1179617</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-24T22:06:16Z</dc:date>
    </item>
    <item>
      <title>Selecting Date Range w/Persistent Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303720#M1179618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks a lot for the example of the correct syntax, that's one of the things that trips me up learning this language. The button-search-string method doesn't work, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The update_date field has the default date format (M/D/YYYY h:mm:ss TT) and I haven't changed the search string you provided either. Should I override the document settings for the date format in the update_date field?&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 22:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303720#M1179618</guid>
      <dc:creator />
      <dc:date>2012-01-24T22:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting Date Range w/Persistent Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303721#M1179619</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;Instead of changing the document properties to read the field with a new format, I'd rather change the search string to match format in the action&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;CODE&gt;=Timestamp(Today() -91, 'M/D/YYYY h:mm:ss tt')&lt;/CODE&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 07:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303721#M1179619</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-25T07:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting Date Range w/Persistent Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303722#M1179620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you, I actually found a way to do it via a bookmark. I included a search box and bookmarked the results of these searches:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;=update_date&amp;gt;now()-7 &lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Cambria','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Cambria','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;=update_date&amp;gt;now()-91&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works beautifully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 20:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-Date-Range-w-Persistent-Variables/m-p/303722#M1179620</guid>
      <dc:creator />
      <dc:date>2012-01-29T20:56:42Z</dc:date>
    </item>
  </channel>
</rss>

