<?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: Including unselected data in before-function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619627#M228221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I don't quite understand what you mean. How do I need to change the expression then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2014 10:59:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-23T10:59:40Z</dc:date>
    <item>
      <title>Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619620#M228214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a pivot-table with, among others, the below expression. The dimensions are country and month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=before(TOTAL count({$&amp;lt;TaskStatus={'New'}&amp;gt;}TaskStatus))-before(TOTAL count({$&amp;lt;TaskStatus={'Cancelled'}&amp;gt;}TaskStatus))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This counts the difference between New and Cancelled tasks from last month. The formula works fine except if I make a date selection, then the first month in the selection becomes blank as there is no data for the before()-function. I can force an inclusion of the data (Month=) in the set analysis, but then the table displays all months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So &lt;STRONG&gt;I want to hide the unselected values in the month-field, but still include them in the calculation. How do I do this?&lt;/STRONG&gt; All other filters should still affect the calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example, the table without selections looks like this:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Dec 2013&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Jan 2014&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Feb 2014&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when selecting 2014 the table should look like this:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Jan 2014&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Feb 2014&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With my current formula it looks like this when selecting 2014 (wrong):&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Jan 2014&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Feb 2014&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 08:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619620#M228214</guid>
      <dc:creator />
      <dc:date>2014-04-25T08:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619621#M228215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone who can help me with this? I've been reading this article: &lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt; among others, but can't manage to solve it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 09:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619621#M228215</guid>
      <dc:creator />
      <dc:date>2014-04-29T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619622#M228216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr() can be helpful. See the attached sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 09:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619622#M228216</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-23T09:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619623#M228217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you tresesco for your help! Your example is working fine, but when I try to incorporate it in my expression I fail. Are you able to say how it should look? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my current expression:&lt;/P&gt;&lt;P&gt;=before(TOTAL count({$&amp;lt;TaskStatus={'New'}&amp;gt;}TaskStatus))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to edit it like this, but that didn't help:&lt;/P&gt;&lt;P&gt;=Before(Only({1}Aggr(Count({$&amp;lt;TaskStatus={'New'}&amp;gt;}TaskStatus),Month)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:42:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619623#M228217</guid>
      <dc:creator />
      <dc:date>2014-05-23T10:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619624#M228218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Month= in set analysis means to exclude only selection not to exclude data i.e Month&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619624#M228218</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2014-05-23T10:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619625#M228219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could post your sample qvw?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619625#M228219</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-23T10:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619626#M228220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately that is difficult as it is rather large with data I can't share. But the expression I'm using now is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=before(TOTAL count({$&amp;lt;TaskStatus={'New'}&amp;gt;}TaskStatus))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is in a pivot table where the vertical dimensions are Year and Month, horizontal dimension is Country.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619626#M228220</guid>
      <dc:creator />
      <dc:date>2014-05-23T10:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619627#M228221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I don't quite understand what you mean. How do I need to change the expression then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619627#M228221</guid>
      <dc:creator />
      <dc:date>2014-05-23T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619628#M228222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this: &lt;A href="http://community.qlik.com/docs/DOC-1290"&gt;How to upload sample qvw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the time try:&lt;/P&gt;&lt;P&gt;=Before(Only({1}Aggr(Count({$&amp;lt;TaskStatus={'New'}&amp;gt;}TaskStatus),&lt;STRONG&gt;Year,&lt;/STRONG&gt;Month)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 11:04:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619628#M228222</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-23T11:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619629#M228223</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;I had no idea about the scramble functionality, thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the file attached. I'm working on the second table ("Calculated data"), specifically the expression called "Target". In this file I'm using week instead of month as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression you proposed didn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 11:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619629#M228223</guid>
      <dc:creator />
      <dc:date>2014-05-23T11:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619630#M228224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gustav,&lt;/P&gt;&lt;P&gt;I have been trying with your attached sample and it has been couple of hours in pieces since that day. Finally I found it that the Before() is not actually behaving properly with Aggr(), while it's counter-part Above() does. I am attaching a sample qvw that shows the issue. The straight table works fine but the pivot. It's strange for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 08:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619630#M228224</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-27T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619631#M228225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you a lot tresesco for trying. I guess I will just need to include a textbox in my report, notifying people the first period in the selection will always be blank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 10:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619631#M228225</guid>
      <dc:creator />
      <dc:date>2014-05-27T10:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619632#M228226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, wait ! Got an alternative. Use fields TaskBu,Year,Week as dimensions, expression:&lt;/P&gt;&lt;P&gt;=Aggr((Above(TOTAL count({$&amp;lt;ReportStatus={'New'}&amp;gt;}ReportStatus))-Above(TOTAL count({$&amp;lt;ReportStatus={'Cancelled'}&amp;gt;}ReportStatus))),TaskBU,Year,Week)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 10:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619632#M228226</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-27T10:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619633#M228227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you tresesco, this looks like great progress! I changed references from Year to WeekYear. However, it still doesn't work (although now it displays something as opposed to nothing):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you select years 2013 &amp;amp; 2014 then the first week of 2014 is correct.&lt;/P&gt;&lt;P&gt;If you select year 2014 then the first week of 2014 is incorrect (a much bigger figure).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 12:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619633#M228227</guid>
      <dc:creator />
      <dc:date>2014-05-27T12:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619634#M228228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you chnaged the dimension, hope you made the similar change in the expression like:&lt;/P&gt;&lt;P&gt;=Aggr((Above(TOTAL count({$&amp;lt;ReportStatus={'New'}&amp;gt;}ReportStatus))-Above(TOTAL count({$&amp;lt;ReportStatus={'Cancelled'}&amp;gt;}ReportStatus))),TaskBU,Year,&lt;STRONG&gt;WeekYear&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, if this doesn't take you to the goal, it has to be something with your fields when getting calculated at the backend.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 12:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619634#M228228</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-27T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Including unselected data in before-function</title>
      <link>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619635#M228229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I did, I also tried setting only TaskBU and WeekYear as dimensions, and "=Aggr((Above(TOTAL count({$&amp;lt;ReportStatus={'New'}&amp;gt;}ReportStatus))-Above(TOTAL count({$&amp;lt;ReportStatus={'Cancelled'}&amp;gt;}ReportStatus))),TaskBU,&lt;STRONG&gt;WeekYear&lt;/STRONG&gt;)" as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But even so, you can see for yourself that the values for week 1 year 2014 in the target-column changes depending if you have 2014 selected or 2013 &amp;amp; 2014.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 12:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Including-unselected-data-in-before-function/m-p/619635#M228229</guid>
      <dc:creator />
      <dc:date>2014-05-27T12:10:32Z</dc:date>
    </item>
  </channel>
</rss>

