<?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: Set Analysis and Aggr - not calculating correctly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70986#M789312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the 3rd expression i would try to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;ID = E({&amp;lt;Action = {'Execute','Plan'}, DATE = {'&amp;gt;=$(=Date(Today()))'} &amp;gt;})&amp;gt;}Distinct [ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for me seems to work with the sample you provided&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Feb 2018 13:24:39 GMT</pubDate>
    <dc:creator>tunoi</dc:creator>
    <dc:date>2018-02-08T13:24:39Z</dc:date>
    <item>
      <title>Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70974#M789294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid #000000; width: 108px; height: 74px;" width="106"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Area&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NORTH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NORTH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;567&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;SOUTH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;789&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;SOUTH&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="174" style="border: 1px solid rgb(0, 0, 0); width: 205px; height: 173px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Action&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Execute&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04/01/2050&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Plan&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;09/01/2050&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Execute&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/01/1999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;567&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Plan&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/01/1999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;789&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Execute&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/01/1999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;789&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Execute&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;06/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created a Straight Table where Dimension is [Area] and there are three expressions. Please see attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st expression ("With Execute"): Count all ID's that have an "Execute" Action with a Date &amp;gt;= Today&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;min&lt;/SPAN&gt;({&amp;lt;[Date]={"&amp;gt;=$(=today())"},[Action]={"Execute"}&amp;gt;}[Date]),[ID]))&amp;gt;0,[ID]))&lt;/P&gt;&lt;P&gt;2nd expression ("With Plan"): Count all ID's that have a "Plan" Action with a Date &amp;gt;= Today&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;min&lt;/SPAN&gt;({&amp;lt;[Date]={"&amp;gt;=$(=today())"},[Action]={"Plan"}&amp;gt;}[Date]),[ID]))&amp;gt;0,[ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1st Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3rd expression ("Without Execute/Plan"): Count all ID's that do not have either an "Execute" or "Plan" Action with a Date &amp;gt;= Today&lt;/P&gt;&lt;P&gt;This one above I haven't figured out what is wrong as it is not calculating correctly. If ID=123, this count should be zero. If ID=789, this count should be zero as well.&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;isnull&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;min&lt;/SPAN&gt;({&amp;lt;[Date]={"&amp;gt;=$(=today())"},[Action]={"Execute","Plan"}&amp;gt;}[Date]),[ID])),[ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;2nd Problem:&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; The first two expressions above &lt;SPAN style="font-size: 13.3333px;"&gt;("With Execute") and &lt;SPAN style="font-size: 13.3333px;"&gt;("With Plan") &lt;/SPAN&gt;&lt;/SPAN&gt;are working fine. But I realize I have records that have both an "Execute" and a "Plan" Action with Date greater than Today. And I don't want them to double count. For example, if you select ID=123, it will currently give a count of 1 on both expressions. I only need it to say 1 for "With Execute" and 0 for "With Plan". Reason being that I don't want it to be counted anymore as a "With Plan" because it already has an "Execute" Action at an earlier date. In other words, if the ID has both an "Execute" and a "Plan" Action with Date greater than today's date, it should only look at the earliest between the two.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70974#M789294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70975#M789295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can try like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With Execute&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {$&amp;lt;DATE = {'&amp;gt;=$(=Date(Today()))'} ,Action={'Plan'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {$&amp;lt;DATE = {'&amp;gt;=$(=Date(Today()))'} ,Action={'Execute'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Without Execute/Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Count(DISTINCT {$&amp;lt;DATE = {'&amp;gt;=$(=Date(Today()))'} ,Action={"=len(trim(Action))=0"}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192782_Capture.JPG" style="height: 172px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Deva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70975#M789295</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2018-02-08T08:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70976#M789297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with Execute: count(distinct{&amp;lt;Action={"Execute"},[Date]={"&amp;gt;=$(=today())"}&amp;gt;}ID)&lt;/P&gt;&lt;P&gt;with Plan: =Count(distinct{&amp;lt;[Date]={"&amp;gt;=$(=today())"},[Action]={"Plan"}&amp;gt;}[ID])&lt;/P&gt;&lt;P&gt;3rd expression: =Count(distinct{$-{&amp;lt;[Date]={"&amp;gt;=$(=today())"},[Action]={"Execute","Plan"}&amp;gt;}[ID])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:30:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70976#M789297</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2018-02-08T08:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70977#M789299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the changes to the first two expressions are giving the same output as my original expressions. Does not seem to make any difference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the 3rd expression, it is now showing zeros. There should be a count of 1 for NORTH (because ID=345 falls under this condition being that it does not have either an "Execute" or "Plan" Action with Date&amp;gt;=Today). And there should be a count of 1 for SOUTH (because ID=567 falls under this condition &lt;SPAN style="font-size: 13.3333px;"&gt;being that it does not have either an "Execute" or "Plan" Action with Date&amp;gt;=Today&lt;/SPAN&gt;). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70977#M789299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-08T09:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70978#M789301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gives the same results as my original expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 3rd expression ("Without Execute/Plan"), there &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;should be a count of 1 for NORTH (because ID=345 falls under this condition being that it does not have either an "Execute" or "Plan" Action with Date&amp;gt;=Today). And there should be a count of 1 for SOUTH (because ID=567 falls under this condition &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;being that it does not have either an "Execute" or "Plan" Action with Date&amp;gt;=Today&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70978#M789301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-08T09:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70979#M789302</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;See attached, building on Deva's file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 09:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70979#M789302</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2018-02-08T09:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70980#M789303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may not have been very clear with my original post. &lt;SPAN style="font-size: 13.3333px;"&gt;I have simplified my example in the revised attached. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 1st and 2nd expressions are working just fine. The only thing I was exploring was whether I can avoid double counting such that if a record has &lt;SPAN style="text-decoration: underline;"&gt;both&lt;/SPAN&gt; a "Plan" and "Execute" Action, I only want it to count under either "With Execute" or "With Plan" (not both). Example is ID=123. It has both a "Plan" and a "Execute" [Action] but I only want it to be counted under "With Plan" because between the two, "Plan" has the earliest [Date]. So if ID=123 is selected, "With Execute" should be 0 and "With Plan" should be 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem I have is that my 3rd expression is not calculating correctly. It should only count if a record has &lt;SPAN style="text-decoration: underline;"&gt;neither&lt;/SPAN&gt; an "Execute" nor a "Plan" Action (examples are ID=345 and ID=567). At the moment also ID=123 and ID=789 are being counted in this column when they shouldn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DESIRED:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Put simply, each record should only be counted under one of the categories i.e. With Execute, With Plan, or Without Execute/Plan. Without any selections, in the chart, NORTH should say 0 for "With Execute", 1 for "With Plan" (ID=123), and 1 for "Without Execute/Plan" (ID=345). SOUTH should say 1 for "With Execute" (ID=789), 0 for "With Plan", and 1 for "Without Execute/Plan" (ID=567).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 10:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70980#M789303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-08T10:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70981#M789305</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;Have you had a look at the application I've posted before?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me it's doing what you are asking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You only have two IDs with Date higher than today (123 and 789)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both are showing "with execute"; none showing "With plan" (123 has a plan action but, since it also has an execute, it is disregarded)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None are showing without execute and plan as it should be based on your description&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 10:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70981#M789305</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2018-02-08T10:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70982#M789306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lorenzo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes saw your file earlier, thanks. For 123 I'd actually like it to fall under "With Plan". Essentially if a record has both a "Plan" and an "Execute", I'd like it to be counted where the Date is earliest. So for 123 this is Plan because 4/1/2050 &amp;lt; 9/1/2050.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for "Without Execute/Plan", 345 and 567 should be counted here because neither of them have either an "Execute" or a "Plan" that has a Date &amp;gt;= Today. They both have a "Execute" and a "Plan" Action but their Dates are in 1999 which is less than Today's date. I understand my initial code is definitely wrong for the 3rd expression, but basically the intended design is to count those records that do not have a "Plan" or "Execute" with a Date&amp;gt;=Today. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Put simply, each record should be counted under one of the categories i.e. With Execute, With Plan, or Without Execute/Plan. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 10:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70982#M789306</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-08T10:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70983#M789308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I understand now. Not sure how to implement it; I've tried with FirstSortedValue and Aggr but cannot get to the desired result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were you I would work on manipulating the data in the loading script. Create a summary table where you only keep the most recent action for each ID. I think it should then be then much easier to obtain what you are looking for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share the file TestData.xlsx?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 12:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70983#M789308</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2018-02-08T12:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70984#M789309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure if it meets all the requirements, but for the sample it seems to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;ID = e({&amp;lt;[Date]={"&amp;gt;=$(=today())"}&amp;gt;})&amp;gt;}Aggr(If(SubStringCount(Concat(DISTINCT '|'&amp;amp;Action&amp;amp;'|'), '|Plan|') and SubStringCount(Concat(DISTINCT '|'&amp;amp;Action&amp;amp;'|'), '|Execute|'), Null(), ID), ID, Area))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192832_Capture.PNG" style="height: 133px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 12:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70984#M789309</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-08T12:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70985#M789310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's no end to the possibilities... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is possible...&lt;/P&gt;&lt;P&gt;You can use the Firstordervalue, with rows with date over todays date, to look for action.&lt;/P&gt;&lt;P&gt;I.e.:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;$(=today())"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Area&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)='Execute',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Area&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;$(=today())"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Area&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)='Plan',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Area&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {$-$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=Date(Today()))'} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Plan"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Execute"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(Don't show null values)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192823_Untitled.png" style="width: 436px; height: 346px;" width="449" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 12:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70985#M789310</guid>
      <dc:creator>hanstorsvik</dc:creator>
      <dc:date>2018-02-08T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70986#M789312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the 3rd expression i would try to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;ID = E({&amp;lt;Action = {'Execute','Plan'}, DATE = {'&amp;gt;=$(=Date(Today()))'} &amp;gt;})&amp;gt;}Distinct [ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for me seems to work with the sample you provided&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70986#M789312</guid>
      <dc:creator>tunoi</dc:creator>
      <dc:date>2018-02-08T13:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggr - not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70987#M789313</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;Try these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With Execute&lt;/STRONG&gt;: Count(If(Match(Aggr(FirstSortedValue( {&amp;lt; Date={"&amp;gt;=$(=Today())"} &amp;gt;} Action, Date), ID), 'Execute') &amp;gt; 0, ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With Plan&lt;/STRONG&gt;: Count(If(Match(Aggr(FirstSortedValue( {&amp;lt; Date={"&amp;gt;=$(=Today())"} &amp;gt;} Action, Date), ID), 'Plan') &amp;gt; 0, ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Without&lt;/STRONG&gt;: Count(DISTINCT ID) - Count(If(Match(Aggr(FirstSortedValue( {&amp;lt; Date={"&amp;gt;=$(=Today())"} &amp;gt;} Action, Date), ID), 'Execute', 'Plan') &amp;gt; 0, ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: some formatting&lt;/P&gt;&lt;P&gt;edit2: changed to get the earliest value instead of latest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Teemu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr-not-calculating-correctly/m-p/70987#M789313</guid>
      <dc:creator>teempi</dc:creator>
      <dc:date>2018-02-08T13:41:21Z</dc:date>
    </item>
  </channel>
</rss>

