<?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 Set analysis restricted by date range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-restricted-by-date-range/m-p/1610442#M445091</link>
    <description>&lt;P&gt;I have an issue trying to report on data.&amp;nbsp; It has come from 2 separate sources.&amp;nbsp; Prior to a cutover date, I want to use data from one table.&amp;nbsp; After the cutover date, I want to use data from a second table.&amp;nbsp; The tables have similar fields in them. I'm also trying to use a variable to cover a date range as I'm reporting on month to date (vDateSetMTD), last quarter and last 12 months. Cutover date is in 2018.&lt;/P&gt;&lt;P&gt;If I run the query for the current period, my query is returning data from the first table when it shouldn't be.&lt;/P&gt;&lt;P&gt;=(SUM({$&amp;lt;FacilityID={'1'},&lt;BR /&gt;Direction={'IN'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} ActualValue) // this is the new data table result&lt;/P&gt;&lt;P&gt;+&lt;BR /&gt;// this next part uses the old table.&amp;nbsp; It is returning a result for the second part giving me a negative result.&amp;nbsp; It shouldn't return anything at all as vDateSetMTD is the current Month&lt;/P&gt;&lt;P&gt;(SUM({$&amp;lt;LocationID={'2'},&lt;BR /&gt;FacilityID={'1'},&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Day={'&amp;lt;=$(=Cutover)'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} Value) -&lt;BR /&gt;SUM({$&amp;lt;LocationID={'3'},&lt;BR /&gt;FacilityID={'1'},&lt;BR /&gt;Day={'&amp;lt;=$(=Cutover)'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} Value)))&lt;/P&gt;&lt;P&gt;In isolation, the first part of the query returns 476, and the second part -628 but it shouldn't be returning anything when vDateSetMTD is July 2019.&lt;/P&gt;&lt;P&gt;Can someone advise what I'm doing wrong?&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:47:57 GMT</pubDate>
    <dc:creator>jlcoombs</dc:creator>
    <dc:date>2024-11-16T02:47:57Z</dc:date>
    <item>
      <title>Set analysis restricted by date range</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-restricted-by-date-range/m-p/1610442#M445091</link>
      <description>&lt;P&gt;I have an issue trying to report on data.&amp;nbsp; It has come from 2 separate sources.&amp;nbsp; Prior to a cutover date, I want to use data from one table.&amp;nbsp; After the cutover date, I want to use data from a second table.&amp;nbsp; The tables have similar fields in them. I'm also trying to use a variable to cover a date range as I'm reporting on month to date (vDateSetMTD), last quarter and last 12 months. Cutover date is in 2018.&lt;/P&gt;&lt;P&gt;If I run the query for the current period, my query is returning data from the first table when it shouldn't be.&lt;/P&gt;&lt;P&gt;=(SUM({$&amp;lt;FacilityID={'1'},&lt;BR /&gt;Direction={'IN'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} ActualValue) // this is the new data table result&lt;/P&gt;&lt;P&gt;+&lt;BR /&gt;// this next part uses the old table.&amp;nbsp; It is returning a result for the second part giving me a negative result.&amp;nbsp; It shouldn't return anything at all as vDateSetMTD is the current Month&lt;/P&gt;&lt;P&gt;(SUM({$&amp;lt;LocationID={'2'},&lt;BR /&gt;FacilityID={'1'},&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Day={'&amp;lt;=$(=Cutover)'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} Value) -&lt;BR /&gt;SUM({$&amp;lt;LocationID={'3'},&lt;BR /&gt;FacilityID={'1'},&lt;BR /&gt;Day={'&amp;lt;=$(=Cutover)'},&lt;BR /&gt;Day={$(vDateSetMTD)}&amp;gt;} Value)))&lt;/P&gt;&lt;P&gt;In isolation, the first part of the query returns 476, and the second part -628 but it shouldn't be returning anything when vDateSetMTD is July 2019.&lt;/P&gt;&lt;P&gt;Can someone advise what I'm doing wrong?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-restricted-by-date-range/m-p/1610442#M445091</guid>
      <dc:creator>jlcoombs</dc:creator>
      <dc:date>2024-11-16T02:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis restricted by date range</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-restricted-by-date-range/m-p/1616810#M445489</link>
      <description>&lt;P&gt;Jamie, have a look at the following Design Blog post, I think it may help somewhat...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There are further links at the bottom of the post, just FYI, and you can back up the URL to Qlik-Design-Blog/ to search on your own as well there if you need some further info that is not in the posts you can get to via the link.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 21:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-restricted-by-date-range/m-p/1616810#M445489</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-08-26T21:01:35Z</dc:date>
    </item>
  </channel>
</rss>

