<?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: Calculate variance between 2 dates in Qlik Sense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518121#M106046</link>
    <description>&lt;P&gt;thanks for the swift reply. How we can pass the Dates selected by the user into the variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eg:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below variables created in my load script to store FromDate and ToDate..&lt;/P&gt;&lt;P&gt;vFromDate=&lt;/P&gt;&lt;P&gt;vToDate=&lt;/P&gt;&lt;P&gt;thanks in Advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 18 May 2025 07:07:01 GMT</pubDate>
    <dc:creator>Kaushik2020</dc:creator>
    <dc:date>2025-05-18T07:07:01Z</dc:date>
    <item>
      <title>Calculate variance between 2 dates in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518118#M106043</link>
      <description>&lt;P&gt;Dear All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a scenario where i have 2 date picker in UI to select from_date and To_Date.&lt;/P&gt;&lt;P&gt;below is my expression where i have to pass these 2 dates. can anyone suggest on how this can be done using a variable ?&lt;/P&gt;&lt;P&gt;Num ((Avg({$&amp;lt;Year=, Month=, Day=, CustomKPILabel={'1_Percentage'},&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;R&lt;/EM&gt;&lt;EM&gt;eportDate={"&amp;gt;=$(=date(monthstart(max(ReportDate))))&amp;lt;=$(=date(max(ReportDate)))"}&amp;gt;}&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;Value)&lt;BR /&gt;/&lt;BR /&gt;Avg({$&amp;lt;Year=, Month=, Day=, CustomKPILabel={'1_Percentage'},&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;ReportDate={"&amp;gt;=$(=date(monthstart(max(ReportDate),-12)))&amp;lt;=$(=date(addmonths(max(ReportDate),-12)))"}&amp;gt;}&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;Value))-1,&lt;BR /&gt;CHR(9650)&amp;amp;'#,##0.0%;'&amp;amp;CHR(9660)&amp;amp;'#,##0%')&lt;/P&gt;&lt;P&gt;Blue --&amp;gt; From_Date&lt;/P&gt;&lt;P&gt;Red--&amp;gt; To_Date&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 06:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518118#M106043</guid>
      <dc:creator>Kaushik2020</dc:creator>
      <dc:date>2025-05-18T06:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate variance between 2 dates in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518119#M106044</link>
      <description>&lt;P&gt;Hi, with $(variable Name) you can retrieve the variable value, ie:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Num ((Avg({$&amp;lt;Year=, Month=, Day=, CustomKPILabel={'1_Percentage'},&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;R&lt;/EM&gt;&lt;EM&gt;eportDate={"&amp;gt;=$(=date(monthstart('$(From_Date)')))&amp;lt;=$(=date('$(From_Date)'))"}&amp;gt;}&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Avg({$&amp;lt;Year=, Month=, Day=, CustomKPILabel={'1_Percentage'},&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;ReportDate={"&amp;gt;=$(=date(monthstart('$(To_Date)',-12)))&amp;lt;=$(=date(addmonths('$(To_Date)',-12)))"}&amp;gt;}&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;Value))-1,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CHR(9650)&amp;amp;'#,##0.0%;'&amp;amp;CHR(9660)&amp;amp;'#,##0%')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe you also need to use Date# depending of the date format set on the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But if you are using the default date picker object, it uses a field, not a variable, so you only need to change your original expression to the field names used in teh date picker.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 06:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518119#M106044</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-05-18T06:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate variance between 2 dates in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518121#M106046</link>
      <description>&lt;P&gt;thanks for the swift reply. How we can pass the Dates selected by the user into the variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eg:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below variables created in my load script to store FromDate and ToDate..&lt;/P&gt;&lt;P&gt;vFromDate=&lt;/P&gt;&lt;P&gt;vToDate=&lt;/P&gt;&lt;P&gt;thanks in Advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 07:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518121#M106046</guid>
      <dc:creator>Kaushik2020</dc:creator>
      <dc:date>2025-05-18T07:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate variance between 2 dates in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518154#M106052</link>
      <description>&lt;P&gt;Hi, if you define a variable that starts with an equal sign, it is evaluated, ie:&lt;/P&gt;&lt;P&gt;SET vFromDate = =Min(DateField);&lt;/P&gt;&lt;P&gt;SET vToDate = =Max(DateField);&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 06:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-variance-between-2-dates-in-Qlik-Sense/m-p/2518154#M106052</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-05-19T06:07:48Z</dc:date>
    </item>
  </channel>
</rss>

