<?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 My date filter -7days not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/My-date-filter-7days-not-working/m-p/1675664#M727499</link>
    <description>&lt;P&gt;i have date filter like start date and end date&lt;/P&gt;&lt;P&gt;For Start Date filters are like -7 days and&amp;nbsp; -21 days&lt;/P&gt;&lt;P&gt;For End date as +7 days and +21 days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a straight table which contains Product id and year basis sales like sales date, and 2017 sales,2018 sales,2019 sales.&lt;/P&gt;&lt;P&gt;In the straight table sum of year based sales are calculated based on sales date between start and end date.&lt;/P&gt;&lt;P&gt;My expression in straight table&lt;/P&gt;&lt;P&gt;sum({&amp;lt;StartYear ={'$(vLY2)'},TempDate = {"&amp;lt;=$(=Date(max({&amp;lt;StartYear={'$(vLY2)'}&amp;gt;}[End Date])+$(vEnd)))&amp;gt;=$(=Date(min({&amp;lt;StartYear={'$(vLY2)'}&amp;gt;}[Start Date])-$(vStart)))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;start year- year of start datae&lt;/P&gt;&lt;P&gt;vLY2- Today()-2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for filter '-7',&amp;nbsp; i have three actions&lt;/P&gt;&lt;P&gt;select in field -field name is&amp;nbsp; [Sales Date] , search in string is&amp;nbsp; &amp;nbsp;=if(YearPeriod= StartYear,date(min([Start Date])-7))&lt;/P&gt;&lt;P&gt;set variable variable- vStart,&amp;nbsp; value = 7&lt;/P&gt;&lt;P&gt;select in field - Field is negative which is created on inline basis with value -7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my straight table i get year basis sales between start and end date based on year&lt;/P&gt;&lt;P&gt;if my default min (start date) is 1/1/2018 and my end date with 2/1/2018&amp;nbsp; it displays records in straight table with this interval for each product&lt;/P&gt;&lt;P&gt;on clicking to -7 , i need to get sales from 12/25/2017. so the sum of values need to get added in existing year based sales.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 01:17:00 GMT</pubDate>
    <dc:creator>durga_bi13</dc:creator>
    <dc:date>2024-11-16T01:17:00Z</dc:date>
    <item>
      <title>My date filter -7days not working</title>
      <link>https://community.qlik.com/t5/QlikView/My-date-filter-7days-not-working/m-p/1675664#M727499</link>
      <description>&lt;P&gt;i have date filter like start date and end date&lt;/P&gt;&lt;P&gt;For Start Date filters are like -7 days and&amp;nbsp; -21 days&lt;/P&gt;&lt;P&gt;For End date as +7 days and +21 days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a straight table which contains Product id and year basis sales like sales date, and 2017 sales,2018 sales,2019 sales.&lt;/P&gt;&lt;P&gt;In the straight table sum of year based sales are calculated based on sales date between start and end date.&lt;/P&gt;&lt;P&gt;My expression in straight table&lt;/P&gt;&lt;P&gt;sum({&amp;lt;StartYear ={'$(vLY2)'},TempDate = {"&amp;lt;=$(=Date(max({&amp;lt;StartYear={'$(vLY2)'}&amp;gt;}[End Date])+$(vEnd)))&amp;gt;=$(=Date(min({&amp;lt;StartYear={'$(vLY2)'}&amp;gt;}[Start Date])-$(vStart)))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;start year- year of start datae&lt;/P&gt;&lt;P&gt;vLY2- Today()-2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for filter '-7',&amp;nbsp; i have three actions&lt;/P&gt;&lt;P&gt;select in field -field name is&amp;nbsp; [Sales Date] , search in string is&amp;nbsp; &amp;nbsp;=if(YearPeriod= StartYear,date(min([Start Date])-7))&lt;/P&gt;&lt;P&gt;set variable variable- vStart,&amp;nbsp; value = 7&lt;/P&gt;&lt;P&gt;select in field - Field is negative which is created on inline basis with value -7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my straight table i get year basis sales between start and end date based on year&lt;/P&gt;&lt;P&gt;if my default min (start date) is 1/1/2018 and my end date with 2/1/2018&amp;nbsp; it displays records in straight table with this interval for each product&lt;/P&gt;&lt;P&gt;on clicking to -7 , i need to get sales from 12/25/2017. so the sum of values need to get added in existing year based sales.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/My-date-filter-7days-not-working/m-p/1675664#M727499</guid>
      <dc:creator>durga_bi13</dc:creator>
      <dc:date>2024-11-16T01:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: My date filter -7days not working</title>
      <link>https://community.qlik.com/t5/QlikView/My-date-filter-7days-not-working/m-p/1683883#M727500</link>
      <description>&lt;P&gt;See duplicate post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/my-date-filter-7-days-no-working-n-straight-table/m-p/1675661#M449747" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Development/my-date-filter-7-days-no-working-n-straight-table/m-p/1675661#M449747&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 16:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/My-date-filter-7days-not-working/m-p/1683883#M727500</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-03-11T16:24:25Z</dc:date>
    </item>
  </channel>
</rss>

