<?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: Dates with no data, Current and Avg in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010251#M958258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please remember that in QlikView you are making selections and as a result expressions are walking field values that are associated with your selections. The first request ("clicking values that are not associated with other selections") cannot be implemented without dummy data as clicking on "Dec" will in effect undo your other selections. You will be able to make your expressions ignore the fact that "Dec" has no data through the use of set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you object to the creation of dummy records with Null values? It is a simple trick to make QlikView behave well by default, and will keep your other expressions simple and maintainable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2015 17:00:41 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-11-02T17:00:41Z</dc:date>
    <item>
      <title>Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010247#M958254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I have an object/expression that takes the sum for current(max) Month. I select year '2015', the max month is still December. For Gender I select 'Female' and for country I select 'China', the max Month is then November. Though in this specific case, so far, I need to break up with general QV functionalty (Sorry). I need to be able to click on December, 'Dec', which is max for all data(lets pretent that we are in 2016). It should show '-' for this month as there is no data in December for the mentioned selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Again Selections are: Gender = 'Female', country='China', Year='2015'. &lt;/P&gt;&lt;P&gt;This other object/expression is an avgerage over the last 6 months aggregated over the sum for each month and year. In this case when I click on December, it should count six month back, so the interval will be from Jul-Dec. There is no data for Aug and Dec, so the the calculation is (Jul,Sep,Okt,Nov,)/4, when December is selected. If there was data for all six month of course it should divide with 6. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to solve this without making any extra dummydata in the datamodel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 16:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010247#M958254</guid>
      <dc:creator />
      <dc:date>2015-11-02T16:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010248#M958255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, not sure to understand the first questtion, for every year the max month will be Dec, why not filtering by this value directly?&lt;/P&gt;&lt;P&gt;Anyway, you can try this:&lt;/P&gt;&lt;P&gt;='Sum current' &amp;amp; '\n' &amp;amp; sum(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {$&amp;lt;Year, Month, Quarter, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date2]={"&amp;gt;=$(=Monthstart(Max({1&amp;lt;Year={'$(=Max(Year))'}&amp;gt;} [Date2]), 0))"}*{"&amp;lt;=$(=MonthEnd(Max({1&amp;lt;Year={'$(=Max(Year))'}&amp;gt;} [Date2]),0))"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} Measure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second question, if there is always 6, use it directly. Change the Avg for a Sum and divide by a fixed '6':&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&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;&amp;nbsp;&amp;nbsp; {$&amp;lt;Year, Month, Quarter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date2]= {"&amp;gt;=$(=Monthstart(Max([Date2]), -6))"}*{"&amp;lt;=$(=MonthEnd(Max([Date2]),0))"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;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;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;Year, Month, Quarter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date2]= {"&amp;gt;=$(=Monthstart(Max([Date2]), -6))"}*{"&amp;lt;=$(=MonthEnd(Max([Date2]),0))"}&amp;gt;} Measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;,YearMonth)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;STRONG&gt;/6&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 16:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010248#M958255</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-11-02T16:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010249#M958256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I edited the first expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 16:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010249#M958256</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-11-02T16:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010250#M958257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx, though not what I need.&lt;/P&gt;&lt;P&gt;1) I am talking about the listbox "Month (Date2)", I need to select 'Dec' there, and then get '-' as value. Actually it was the first step to the second problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) so it is related to the first problem, I need to select 'Dec', but not calculating it for 'Dec', but since there is data for the other months in the 6 month back interval, I will get a result . Sometimes there is 4 months with data other times there is 6. Optimal there is 6 month, but is is not fixed, depends on how much data there. Most of the way the avg function takes care of this.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 16:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010250#M958257</guid>
      <dc:creator />
      <dc:date>2015-11-02T16:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010251#M958258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please remember that in QlikView you are making selections and as a result expressions are walking field values that are associated with your selections. The first request ("clicking values that are not associated with other selections") cannot be implemented without dummy data as clicking on "Dec" will in effect undo your other selections. You will be able to make your expressions ignore the fact that "Dec" has no data through the use of set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you object to the creation of dummy records with Null values? It is a simple trick to make QlikView behave well by default, and will keep your other expressions simple and maintainable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 17:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010251#M958258</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-11-02T17:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010252#M958259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you and others said, you will break up with QV standard behaviour / logic, but maybe you can achieve 1) with something like demonstrated here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/189690"&gt;Keeping selection list even if no values&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 17:04:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010252#M958259</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-02T17:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dates with no data, Current and Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010253#M958260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter, You describe the problem pretty exact.&lt;/P&gt;&lt;P&gt;I just hope to see if anyone can solve it without dummydata, my colleague told me the same, its very unlikely that it can be done. I will ask for the dummydata solution, if there is no other alternatives.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With out dummydata, there is of course less data, though perhaps not significant.&lt;/P&gt;&lt;P&gt;Did I got it right that I can still have both versions in the same application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 17:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-with-no-data-Current-and-Avg/m-p/1010253#M958260</guid>
      <dc:creator />
      <dc:date>2015-11-02T17:16:46Z</dc:date>
    </item>
  </channel>
</rss>

