<?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 Date range in set analysis not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-range-in-set-analysis-not-working/m-p/463019#M562249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have this issue where I'm calculating the extrapolation (please see the formula below) but for some reason it's returning ZERO for some dealers.&lt;/P&gt;&lt;P&gt;I've investigated it and have an idea what's going on but I don't know how to get around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the screenshots attached you'll see &lt;STRONG&gt;Mel &lt;/STRONG&gt;and &lt;STRONG&gt;David &lt;/STRONG&gt;do have revenue in the &lt;STRONG&gt;YTD FY13&lt;/STRONG&gt; column but the column &lt;STRONG&gt;YTD FY13 Extrapolated&lt;/STRONG&gt; is showing ZERO!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula to calculate the extrapolation on column &lt;STRONG&gt;YTD FY13 Extrapolated &lt;/STRONG&gt;is as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;=Sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Month=, Year=, [Financial Year]=, [Deal Date] = {'&amp;gt;=$(=Date(YearStart(Min([Deal Date]), 0, 10)))&amp;lt;=$(=Date(Max([Deal Date])))'} &amp;gt;} [Daily Margin@AUD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / networkdays(YearStart(Max([Deal Date]), 0, 10), Max([Deal Date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * networkdays(YearStart(Max([Deal Date]), 0, 10), yearEnd( Max([Deal Date]), 0, 10))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , [Sales Dealer Name]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;/1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;The reason I'm using Aggr is because this pivot table was giving me wrong totals as QV pivot tables don't sum row by row - don't ask me why! Otherwise the formula would be just from the second &lt;STRONG&gt;SUM.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;So, what I found out was that if I select &lt;STRONG&gt;Mel &lt;/STRONG&gt;for example (second screenshot) my calendar unselect &lt;STRONG&gt;MAR&amp;nbsp; &lt;/STRONG&gt;as he doesn't have revenue in March and the correct extrapolation is returned. Therefore when I'm calculating the date range in the formula above, I'm guessing my Max(Date) will be null in Mel's case as he doesn't have date in March. Thus QV is returning ZERO when &lt;STRONG&gt;Mel &lt;/STRONG&gt;is not selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Does anyone have any idea how to fix this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Mar 2013 05:06:08 GMT</pubDate>
    <dc:creator>drjoffily</dc:creator>
    <dc:date>2013-03-21T05:06:08Z</dc:date>
    <item>
      <title>Date range in set analysis not working</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-set-analysis-not-working/m-p/463019#M562249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have this issue where I'm calculating the extrapolation (please see the formula below) but for some reason it's returning ZERO for some dealers.&lt;/P&gt;&lt;P&gt;I've investigated it and have an idea what's going on but I don't know how to get around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the screenshots attached you'll see &lt;STRONG&gt;Mel &lt;/STRONG&gt;and &lt;STRONG&gt;David &lt;/STRONG&gt;do have revenue in the &lt;STRONG&gt;YTD FY13&lt;/STRONG&gt; column but the column &lt;STRONG&gt;YTD FY13 Extrapolated&lt;/STRONG&gt; is showing ZERO!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula to calculate the extrapolation on column &lt;STRONG&gt;YTD FY13 Extrapolated &lt;/STRONG&gt;is as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;=Sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Month=, Year=, [Financial Year]=, [Deal Date] = {'&amp;gt;=$(=Date(YearStart(Min([Deal Date]), 0, 10)))&amp;lt;=$(=Date(Max([Deal Date])))'} &amp;gt;} [Daily Margin@AUD])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / networkdays(YearStart(Max([Deal Date]), 0, 10), Max([Deal Date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * networkdays(YearStart(Max([Deal Date]), 0, 10), yearEnd( Max([Deal Date]), 0, 10))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , [Sales Dealer Name]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;/1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;The reason I'm using Aggr is because this pivot table was giving me wrong totals as QV pivot tables don't sum row by row - don't ask me why! Otherwise the formula would be just from the second &lt;STRONG&gt;SUM.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;So, what I found out was that if I select &lt;STRONG&gt;Mel &lt;/STRONG&gt;for example (second screenshot) my calendar unselect &lt;STRONG&gt;MAR&amp;nbsp; &lt;/STRONG&gt;as he doesn't have revenue in March and the correct extrapolation is returned. Therefore when I'm calculating the date range in the formula above, I'm guessing my Max(Date) will be null in Mel's case as he doesn't have date in March. Thus QV is returning ZERO when &lt;STRONG&gt;Mel &lt;/STRONG&gt;is not selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Does anyone have any idea how to fix this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 05:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-set-analysis-not-working/m-p/463019#M562249</guid>
      <dc:creator>drjoffily</dc:creator>
      <dc:date>2013-03-21T05:06:08Z</dc:date>
    </item>
  </channel>
</rss>

