<?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: Set Analysis, date variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622625#M46356</link>
    <description>Thanks, Sunny! Second expression works. I was sure, that I've already tried it before, but may be I misspelled somewhere.</description>
    <pubDate>Wed, 11 Sep 2019 12:47:53 GMT</pubDate>
    <dc:creator>mrbalyaqv</dc:creator>
    <dc:date>2019-09-11T12:47:53Z</dc:date>
    <item>
      <title>Set Analysis, date variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622613#M46354</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;I'm trying to make a table with comparison of sales for different periods. User should select one sale period first, and then table would show data for that period and same period from previous year.&lt;/P&gt;&lt;P&gt;Sale periods are in 'YYYY-MM-DD' format with DD = '01'.&lt;/P&gt;&lt;P&gt;I use variables below:&lt;BR /&gt;v_sf_MaxPeriod =&amp;nbsp;date(max(saleperiod), 'YYYY-MM-DD')&lt;BR /&gt;v_sf_PriorYearDate = date(addyears(max(saleperiod),-1), 'YYYY-MM-DD')&lt;/P&gt;&lt;P&gt;I checked their values in text object, they're ok.&lt;/P&gt;&lt;P&gt;Expression (1) for selected period works correct:&lt;BR /&gt;SUM({&amp;lt;saleperiod={"=$(v_sf_MaxPeriod)"}&amp;gt;} sf_fact_count)&lt;/P&gt;&lt;P&gt;Same expression (2) for&amp;nbsp;same period in previous year doesn't work:&lt;BR /&gt;SUM({&amp;lt;saleperiod={"=$(v_sf_PriorYearDate )"}&amp;gt;} sf_fact_count)&lt;/P&gt;&lt;P&gt;It returns same result as the previous one. But if I change expression (3) to:&lt;BR /&gt;SUM({&amp;lt;saleperiod={"&amp;lt;=$(=$(v_sf_PriorYearDate))&amp;gt;=$(=$(v_sf_PriorYearDate))"}&amp;gt;} sf_fact_count)&lt;BR /&gt;it works correct.&lt;/P&gt;&lt;P&gt;Why my expression (2) doesn't work? How to fix it?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622613#M46354</guid>
      <dc:creator>mrbalyaqv</dc:creator>
      <dc:date>2024-11-16T04:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis, date variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622620#M46355</link>
      <description>&lt;P&gt;Can you try one of these&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;saleperiod = {"$(v_sf_PriorYearDate)"}&amp;gt;} sf_fact_count)&lt;/LI-CODE&gt;&lt;P&gt;Removed = before $ in the above expression&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;saleperiod = {"$(=$(v_sf_PriorYearDate))"}&amp;gt;} sf_fact_count)&lt;/LI-CODE&gt;&lt;P&gt;Added $(...) in the above expression&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 12:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622620#M46355</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-11T12:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis, date variable</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622625#M46356</link>
      <description>Thanks, Sunny! Second expression works. I was sure, that I've already tried it before, but may be I misspelled somewhere.</description>
      <pubDate>Wed, 11 Sep 2019 12:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-date-variable/m-p/1622625#M46356</guid>
      <dc:creator>mrbalyaqv</dc:creator>
      <dc:date>2019-09-11T12:47:53Z</dc:date>
    </item>
  </channel>
</rss>

