<?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: Previous date by using variable in set expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719181#M54643</link>
    <description>&lt;P&gt;Try to share your sample app. Also try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vPreviousDate = &lt;STRONG&gt;Date&lt;/STRONG&gt;(today() - 1, &lt;STRONG&gt;'M/D/YYYY'&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Sum({$&amp;lt;[NUMDATE]= {'$(=vPreviousDate)'}&amp;gt;} KNIT_BACKLOG_OPENGT)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 10:30:17 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2020-06-16T10:30:17Z</dc:date>
    <item>
      <title>Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719091#M54627</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to fetching&amp;nbsp; previous date data in measure by using set expression . My date in number format .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code :&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;NUM_DATE=${('v_pre_date')}&amp;gt;} KNIT_BACKLOG_OPENGT )&lt;/P&gt;&lt;P&gt;//Date in number format&lt;/P&gt;&lt;P&gt;//variable value = today(date(NUM_DATE)) - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But my code is not working . Please help me .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zarnabkhan_0-1592293985748.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35610iEB9CA6F9DA1DE779/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zarnabkhan_0-1592293985748.png" alt="Zarnabkhan_0-1592293985748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 07:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719091#M54627</guid>
      <dc:creator>Zarnabkhan</dc:creator>
      <dc:date>2020-06-16T07:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719104#M54631</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/96782"&gt;@Zarnabkhan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can calculate the previous date using these ways&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;set analysis:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Sum({$&amp;lt;NUM_DATE={'$(Max(NUM_DATE)-1)'}&amp;gt;}KNIT_BACKLOG_OPENGT)&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;2.Use variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Create variable : vPreviousDate = &lt;STRONG&gt;Max(NUM_DATE)-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Use set analysis : =Sum({$&amp;lt;[NUM_DATE]= {"$(=vPreviousDate)"}&amp;gt;} KNIT_BACKLOG_OPENGT)&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;raji&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 08:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719104#M54631</guid>
      <dc:creator>raji6763</dc:creator>
      <dc:date>2020-06-16T08:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719155#M54635</link>
      <description>&lt;P&gt;Thanks Raji , i tried ,&amp;nbsp; &amp;nbsp;but your solution is not working .&amp;nbsp; With fix date working fine.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;=sum( {$&amp;lt;[DATE.autoCalendar.Date]=&lt;STRONG&gt;{"6/14/2020"}&amp;gt;&lt;/STRONG&gt;} KNIT_BACKLOG_OPENGT )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;above line with date format working fine but date in number format and using variable is not working .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;=Sum({$&amp;lt;[NUMDATE]= {"$(=vPreviousDate)"}&amp;gt;} KNIT_BACKLOG_OPENGT)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;above code compiles but gives logical error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please Help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards:&lt;/P&gt;&lt;P&gt;Zarnab Khan&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 09:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719155#M54635</guid>
      <dc:creator>Zarnabkhan</dc:creator>
      <dc:date>2020-06-16T09:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719159#M54637</link>
      <description>&lt;P&gt;how did you define the variable? Try this way&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;=Sum({$&amp;lt;[NUMDATE]= {"&lt;FONT color="#FF0000"&gt;=&lt;/FONT&gt;$(=vPreviousDate)"}&amp;gt;} KNIT_BACKLOG_OPENGT)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 09:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719159#M54637</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2020-06-16T09:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719163#M54638</link>
      <description>&lt;P&gt;Your variable definition needs to be corrected I guess. Try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vPreviousDate = today() - 1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719163#M54638</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-06-16T10:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719171#M54640</link>
      <description>&lt;P&gt;Thanks to all ,&amp;nbsp; your solutions compiles successfully but&amp;nbsp; giving no results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719171#M54640</guid>
      <dc:creator>Zarnabkhan</dc:creator>
      <dc:date>2020-06-16T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719177#M54642</link>
      <description>&lt;P&gt;could you please check your field name?please share your set expression and variable value&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719177#M54642</guid>
      <dc:creator>raji6763</dc:creator>
      <dc:date>2020-06-16T10:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719181#M54643</link>
      <description>&lt;P&gt;Try to share your sample app. Also try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vPreviousDate = &lt;STRONG&gt;Date&lt;/STRONG&gt;(today() - 1, &lt;STRONG&gt;'M/D/YYYY'&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Sum({$&amp;lt;[NUMDATE]= {'$(=vPreviousDate)'}&amp;gt;} KNIT_BACKLOG_OPENGT)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719181#M54643</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-06-16T10:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719194#M54644</link>
      <description>&lt;P&gt;Dear Tresesco&amp;nbsp; thanks for your reply , but&amp;nbsp; &amp;nbsp;your expression giving error please check attached screen shorts .&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 10:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719194#M54644</guid>
      <dc:creator>Zarnabkhan</dc:creator>
      <dc:date>2020-06-16T10:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Previous date by using variable in set expression</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719210#M54645</link>
      <description>&lt;P&gt;Put '=' sign in variable definition and try.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 11:22:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-date-by-using-variable-in-set-expression/m-p/1719210#M54645</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-06-16T11:22:25Z</dc:date>
    </item>
  </channel>
</rss>

