<?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: How can I manipulate a variable date I set in the query on the report sheet in Archived Groups</title>
    <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576820#M2506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you deactivate those two WHERE_bits (those rgd. the variables) from your SELECT_statements, does it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Test the two variables in a text_box on the GUI first to see whether you have to reference them with $() or without (I'd guess without for they hold only one value each, not an expression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Mar 2014 14:10:07 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2014-03-14T14:10:07Z</dc:date>
    <item>
      <title>How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576818#M2504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;Please I have two variable dates in my query and when I run it it gives me a blank report even after I set the dates to a default. My question is please can I have like a text box to change these dates (Like a date range) from the report sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vtotal_date_from = '2013-11-30';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vtotal_date_to = '2013-12-31';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;customer.entity_id AS customer_id,&lt;/P&gt;&lt;P&gt;firstname.value AS firstname,&lt;/P&gt;&lt;P&gt;lastname.value AS lastname,&lt;/P&gt;&lt;P&gt;customer.`email` AS email,&lt;/P&gt;&lt;P&gt;phone.value AS telephone,&lt;/P&gt;&lt;P&gt;pu.created_at AS total_verify_date&lt;/P&gt;&lt;P&gt;FROM customer_entity customer&lt;/P&gt;&lt;P&gt;LEFT JOIN `customer_entity_varchar` firstname ON (firstname.entity_id = customer.entity_id AND firstname.attribute_id = 5)&lt;/P&gt;&lt;P&gt;LEFT JOIN `customer_entity_varchar` lastname ON (lastname.entity_id = customer.entity_id AND lastname.attribute_id = 7)&lt;/P&gt;&lt;P&gt;LEFT JOIN `customer_address_entity_varchar` phone ON (phone.entity_id = customer.entity_id AND phone.attribute_id = 31)&lt;/P&gt;&lt;P&gt;INNER JOIN (SELECT customer_id , sales_flat_order_status_history.`created_at`,&lt;/P&gt;&lt;P&gt;MIN(sales_flat_order_status_history.`entity_id`) AS entity_id&lt;/P&gt;&lt;P&gt;FROM sales_flat_order&lt;/P&gt;&lt;P&gt;LEFT JOIN sales_flat_order_status_history ON sales_flat_order_status_history.parent_id = sales_flat_order.entity_id&lt;/P&gt;&lt;P&gt;WHERE ((sales_flat_order_status_history.status LIKE '%verified%' AND sales_flat_order_status_history.status NOT LIKE '%canceled%'&lt;/P&gt;&lt;P&gt;AND sales_flat_order.created_at &amp;gt; '2013-11-01')&lt;/P&gt;&lt;P&gt;OR (sales_flat_order.status LIKE '%complete%' AND sales_flat_order.created_at &amp;lt; '2013-11-01'))&lt;/P&gt;&lt;P&gt;AND sales_flat_order_status_history.`created_at` &amp;gt;=&lt;STRONG&gt; $(vtotal_date_from)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND sales_flat_order_status_history.created_at &amp;lt;= &lt;STRONG&gt;$(vtotal_date_from)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND sales_flat_order.customer_id IS NOT NULL&lt;/P&gt;&lt;P&gt;GROUP BY sales_flat_order_status_history.`parent_id`) AS pu ON pu.customer_id = customer.entity_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2025 17:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576818#M2504</guid>
      <dc:creator />
      <dc:date>2025-07-22T17:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576819#M2505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First thing to try is the single quotes:&lt;/P&gt;&lt;P&gt;AND sales_flat_order_status_history.`created_at` &amp;gt;=&lt;STRONG&gt; '$(vtotal_date_from)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND sales_flat_order_status_history.created_at &amp;lt;= '&lt;STRONG&gt;$(vtotal_date_from)'&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576819#M2505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-14T14:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576820#M2506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you deactivate those two WHERE_bits (those rgd. the variables) from your SELECT_statements, does it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Test the two variables in a text_box on the GUI first to see whether you have to reference them with $() or without (I'd guess without for they hold only one value each, not an expression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:10:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576820#M2506</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-03-14T14:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576821#M2507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to the quotes, make sure the dates are in a format the database recognises. Try running the query with the dates hard coded to make sure the query is running correctly, and then add the date variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576821#M2507</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-03-14T14:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576822#M2508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't really understand. Please can you explain more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576822#M2508</guid>
      <dc:creator />
      <dc:date>2014-03-14T14:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576823#M2509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys, the problem I'm having is can I reset these variables on the sheet to another date. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576823#M2509</guid>
      <dc:creator />
      <dc:date>2014-03-14T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576824#M2510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;All you need is the input box for these two variables, and remove LET statements from the script, otherwise they'll override what you have in the input box.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576824#M2510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-14T14:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576825#M2511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 16:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576825#M2511</guid>
      <dc:creator />
      <dc:date>2014-03-14T16:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manipulate a variable date I set in the query on the report sheet</title>
      <link>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576826#M2512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an add-on, another nice trick is to use the WHEN statement in your script to set the variable to a default date if it wasn't entered in the input box:&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;WHEN '$(vtotal_date_from)' = '' LET vtotal_date_from = '2013-11-30';&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reverse statement is UNLESS. More info can be found here: &lt;A href="http://www.qlikfix.com/2013/04/05/when-and-unless/" title="http://www.qlikfix.com/2013/04/05/when-and-unless/"&gt;WHEN and UNLESS » The Qlik Fix! The Qlik Fix!&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 14:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/How-can-I-manipulate-a-variable-date-I-set-in-the-query-on-the/m-p/576826#M2512</guid>
      <dc:creator>barryharmsen</dc:creator>
      <dc:date>2014-03-15T14:40:43Z</dc:date>
    </item>
  </channel>
</rss>

