<?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 Picker- default selected date compare to in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1860943#M71044</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If my understanding is correct, you would like to select a date range in the first &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt;, such as from &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/24/2021"&lt;/STRONG&gt;&lt;/SPAN&gt; to&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/31/2021" &lt;/STRONG&gt;&lt;/SPAN&gt;and you would like to automatically have the second &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt; select the dates from&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; "1/17/2021"&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/24/2021"&lt;/STRONG&gt;&lt;/SPAN&gt;, where this range has 7 days difference.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To implement this solution, you will have to attach a trigger action when the &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;is selected, however natively this is not supported in &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt; object. There is an extension&lt;SPAN style="color:#1abc9c"&gt;&lt;STRONG&gt; "qlik-sense-action-triggers"&lt;/STRONG&gt;&lt;/SPAN&gt; [1], that might be able to help you achieve your desired outcome. You can read the details and test the sample app, to get familiar with the extension, however since it is not developed by Qlik, if you have any issues with the outcome, or you need additional help, then you will have to reach to the developer of the extension.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;STRONG&gt;Another workaround that can help you achieve a similar outcome is the following&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;EM&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#95a5a6"&gt;&lt;EM&gt;&lt;STRONG&gt; Please keep in mind that this is just a suggestion and the same use case scenario might be achieved with other options as well. However, this is the one that I have fully tested that is working and it can get you as close as possible to the desired outcome.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. I have the following dataset:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/aa8c5e8a-6b6e-4b55-a2e4-a465d3b06580.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;These are data from 2 different tables.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2. Create 2 variables:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/d552eb47-e2c8-4b52-9bf9-14b4f7f2f7e7.default.png" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3. Create 2 variable inputs:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/1dc47bf6-84ef-40cd-9bf7-4bf7fd096fc2.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;I have assigned to the first one the variable &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom &lt;/STRONG&gt;&lt;/SPAN&gt;and to the second one the variable &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;4. Create a button with 2 actions:&lt;/P&gt;

&lt;P&gt;Both actions have&lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt; "Select values matching search criteria"&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt; as selected option. However first action has the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;and the second variable has the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date2&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Action 1:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/4175deb4-c4d5-44c6-8a56-71f665150bc9.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;Expression:&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;&amp;nbsp;='&amp;gt;=$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&amp;lt;=$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This expression will select the values in field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;based on the values that the user has selected in the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Variable input&lt;/STRONG&gt;&lt;/SPAN&gt; objects.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Action 2:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/759f3b48-e4ff-4675-8c75-fe3260750ac0.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;Expression:&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;&amp;nbsp;='&amp;gt;=$(=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#e74c3c"&gt;&lt;STRONG&gt;-7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;))&amp;lt;=$(=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#e74c3c"&gt;&lt;STRONG&gt;-7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;))'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;This expression will first subtract 7 days from the dates that the user has specified in the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Variable input&lt;/STRONG&gt;&lt;/SPAN&gt; objects and then will make the selection in &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date2 &lt;/STRONG&gt;&lt;/SPAN&gt;filed.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;After clicking the button this is what I get:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/52f01af8-2e75-4055-a8a5-f61b4e2d7711.default.png" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see the first selection is the values that the user has specified and the second selection is the same values but 7 days prior.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;STRONG&gt;I hope that this information was helpful. In case this has helped you resolve the issue, please mark the answer as solution to provide further visibility for other community members. In case I have misunderstood the use case scenario, please elaborate in detail by providing additional information.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://github.com/mcgovey/qlik-sense-action-triggers" target="_blank"&gt;https://github.com/mcgovey/qlik-sense-action-triggers&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 11:51:57 GMT</pubDate>
    <dc:creator>Andrei_Cusnir</dc:creator>
    <dc:date>2021-11-18T11:51:57Z</dc:date>
    <item>
      <title>Date Picker- default selected date compare to</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1860464#M70999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm using the Date Picker object while having two calendars in my script.&lt;BR /&gt;1. Calendar -&amp;nbsp; which represent "Current Date"&lt;BR /&gt;2. Calendar_2 - which represent "Compare To"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="chloe_0-1637154359486.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66846iDE8D9FCE485FB38F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="chloe_0-1637154359486.png" alt="chloe_0-1637154359486.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What I want to create is the option that when the user selects the "current date", on default the" compare to" will be on the same days last week.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that possible?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 16:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1860464#M70999</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2021-11-30T16:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date Picker- default selected date compare to</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1860943#M71044</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If my understanding is correct, you would like to select a date range in the first &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt;, such as from &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/24/2021"&lt;/STRONG&gt;&lt;/SPAN&gt; to&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/31/2021" &lt;/STRONG&gt;&lt;/SPAN&gt;and you would like to automatically have the second &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt; select the dates from&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt; "1/17/2021"&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;"1/24/2021"&lt;/STRONG&gt;&lt;/SPAN&gt;, where this range has 7 days difference.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To implement this solution, you will have to attach a trigger action when the &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;is selected, however natively this is not supported in &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Date picker&lt;/STRONG&gt;&lt;/SPAN&gt; object. There is an extension&lt;SPAN style="color:#1abc9c"&gt;&lt;STRONG&gt; "qlik-sense-action-triggers"&lt;/STRONG&gt;&lt;/SPAN&gt; [1], that might be able to help you achieve your desired outcome. You can read the details and test the sample app, to get familiar with the extension, however since it is not developed by Qlik, if you have any issues with the outcome, or you need additional help, then you will have to reach to the developer of the extension.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;STRONG&gt;Another workaround that can help you achieve a similar outcome is the following&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;EM&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#95a5a6"&gt;&lt;EM&gt;&lt;STRONG&gt; Please keep in mind that this is just a suggestion and the same use case scenario might be achieved with other options as well. However, this is the one that I have fully tested that is working and it can get you as close as possible to the desired outcome.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. I have the following dataset:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/aa8c5e8a-6b6e-4b55-a2e4-a465d3b06580.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;These are data from 2 different tables.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2. Create 2 variables:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/d552eb47-e2c8-4b52-9bf9-14b4f7f2f7e7.default.png" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3. Create 2 variable inputs:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/1dc47bf6-84ef-40cd-9bf7-4bf7fd096fc2.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;I have assigned to the first one the variable &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom &lt;/STRONG&gt;&lt;/SPAN&gt;and to the second one the variable &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;4. Create a button with 2 actions:&lt;/P&gt;

&lt;P&gt;Both actions have&lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt; "Select values matching search criteria"&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt; as selected option. However first action has the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;and the second variable has the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date2&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Action 1:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/4175deb4-c4d5-44c6-8a56-71f665150bc9.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;Expression:&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;&amp;nbsp;='&amp;gt;=$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&amp;lt;=$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This expression will select the values in field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date1 &lt;/STRONG&gt;&lt;/SPAN&gt;based on the values that the user has selected in the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Variable input&lt;/STRONG&gt;&lt;/SPAN&gt; objects.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Action 2:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/759f3b48-e4ff-4675-8c75-fe3260750ac0.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;Expression:&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;&amp;nbsp;='&amp;gt;=$(=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varFrom&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#e74c3c"&gt;&lt;STRONG&gt;-7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;))&amp;lt;=$(=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;varTo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#e74c3c"&gt;&lt;STRONG&gt;-7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;))'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;This expression will first subtract 7 days from the dates that the user has specified in the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;Variable input&lt;/STRONG&gt;&lt;/SPAN&gt; objects and then will make the selection in &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Date2 &lt;/STRONG&gt;&lt;/SPAN&gt;filed.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;After clicking the button this is what I get:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/52f01af8-2e75-4055-a8a5-f61b4e2d7711.default.png" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see the first selection is the values that the user has specified and the second selection is the same values but 7 days prior.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;STRONG&gt;I hope that this information was helpful. In case this has helped you resolve the issue, please mark the answer as solution to provide further visibility for other community members. In case I have misunderstood the use case scenario, please elaborate in detail by providing additional information.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;---&lt;/P&gt;

&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://github.com/mcgovey/qlik-sense-action-triggers" target="_blank"&gt;https://github.com/mcgovey/qlik-sense-action-triggers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 11:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1860943#M71044</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2021-11-18T11:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date Picker- default selected date compare to</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1897143#M74047</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/146877"&gt;@Andrei_Cusnir&lt;/a&gt;&amp;nbsp; for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 13:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Picker-default-selected-date-compare-to/m-p/1897143#M74047</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2022-02-24T13:33:24Z</dc:date>
    </item>
  </channel>
</rss>

