<?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: Setting up a marker based on historic data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374544#M512307</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;Maybe this as an expression (for the flag):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=if(sum(Profit)&amp;gt;=aggr(Above(sum(Profit)),Dates,Customer), 1, 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;see attached the QVW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Nov 2017 09:01:24 GMT</pubDate>
    <dc:creator>YoussefBelloum</dc:creator>
    <dc:date>2017-11-27T09:01:24Z</dc:date>
    <item>
      <title>Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374543#M512306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 year worth of data from (31 Jan 2014 until 31 October 2017) for a list of clients with profits.&amp;nbsp; I would like to have a marker/flag that would mark the client as 1 if the profit has ever been greater or equal to 1 prior to the date being viewed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie if I look at customer A in January 2014 the profit is 5, so expected result is 0. But if I take the same customer, A, in March, I want the flag to say 1 as in February it was equal/or greater than the threshold of 10.&amp;nbsp; I am sure this could be done within a script, but due to being in a corporate environment this tool is restricted.&amp;nbsp; Is it possible to get an expression/set analysis solution for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always your help is most appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 303px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="71"&gt;Dates&lt;/TD&gt;&lt;TD class="xl66" width="64"&gt;Customer&lt;/TD&gt;&lt;TD class="xl66" width="64"&gt;Profit&lt;/TD&gt;&lt;TD class="xl66" width="104"&gt;Expected result&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;31-Jan-14&lt;/TD&gt;&lt;TD class="xl67"&gt;A&lt;/TD&gt;&lt;TD class="xl67"&gt;5&lt;/TD&gt;&lt;TD class="xl67"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;31-Jan-14&lt;/TD&gt;&lt;TD class="xl68"&gt;B&lt;/TD&gt;&lt;TD class="xl68"&gt;10&lt;/TD&gt;&lt;TD class="xl68"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;28-Feb-14&lt;/TD&gt;&lt;TD class="xl67"&gt;A&lt;/TD&gt;&lt;TD class="xl67"&gt;10&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;28-Feb-14&lt;/TD&gt;&lt;TD class="xl68"&gt;B&lt;/TD&gt;&lt;TD class="xl68"&gt;5&lt;/TD&gt;&lt;TD class="xl68"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;28-Feb-14&lt;/TD&gt;&lt;TD class="xl69"&gt;C&lt;/TD&gt;&lt;TD class="xl69"&gt;20&lt;/TD&gt;&lt;TD class="xl69"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;31-Mar-14&lt;/TD&gt;&lt;TD class="xl67"&gt;A&lt;/TD&gt;&lt;TD class="xl67"&gt;8&lt;/TD&gt;&lt;TD class="xl67"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;31-Mar-14&lt;/TD&gt;&lt;TD class="xl68"&gt;B&lt;/TD&gt;&lt;TD class="xl68"&gt;10&lt;/TD&gt;&lt;TD class="xl68"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;31-Mar-14&lt;/TD&gt;&lt;TD class="xl69"&gt;C&lt;/TD&gt;&lt;TD class="xl69"&gt;1&lt;/TD&gt;&lt;TD class="xl69"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 08:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374543#M512306</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2017-11-27T08:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374544#M512307</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;Maybe this as an expression (for the flag):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=if(sum(Profit)&amp;gt;=aggr(Above(sum(Profit)),Dates,Customer), 1, 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;see attached the QVW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:01:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374544#M512307</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-27T09:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374545#M512308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you with your reply.&amp;nbsp; Unfortunately this doesn't work.&amp;nbsp; I need my Flag to be like the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I a look at Customer A in March 2014 the profit is less than 10, but historically it has been &amp;gt;= 10 so it should be flagged as one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same thing with C.&amp;nbsp; In Februrary it &amp;gt;= 10 but in March it is only 1, but the flag should say 1 as it has been above 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This flag is going to be a small part of a bigger picture.&amp;nbsp; I will be using this to identify customers that have ever had profits more than 10 before the period that is being selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will be running analysis on the customers on January 2017 that have had profits &amp;gt;=10 since the flag has been implemented.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it makes a bit more sens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aksel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:19:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374545#M512308</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2017-11-27T09:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374546#M512309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I might be over complicating it.&amp;nbsp; I realise that if I use =if(max(profit),'1','0') then I seem to get the correct flag.&amp;nbsp; But I think I just need one small little amendment to only have it look at the selection data and prior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I select March 2014, the max statement should be from the first available date up and including March 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same for 2017;&amp;nbsp; if I select October 2017, max should only look at all prior dates up and including October 2017 and should not go to November 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aksel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374546#M512309</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2017-11-27T09:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374547#M512310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use this, you will always have 1 as a flag no matter the selections you made&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:37:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374547#M512310</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-27T09:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374548#M512311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But your data is not giving me the right results.&amp;nbsp; If you look at your flags, once a customer has reached 10 of profit, it should always remain as 1 as flag.&amp;nbsp; In your example Customer A flag is 0 in January, which is correct, then in February it should be 1 (as profit is 10) , but you have 0 and in March it should remain as 1(even though the balance went down).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374548#M512311</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2017-11-27T09:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374549#M512312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm aware that i gave you incomplete answer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 09:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374549#M512312</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-27T09:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a marker based on historic data</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374550#M512313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid I just don't see it. I mean, I do not understand what you are trying to do with the Above and Aggr functions in terms of the logic.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-a-marker-based-on-historic-data/m-p/1374550#M512313</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2017-11-27T11:27:06Z</dc:date>
    </item>
  </channel>
</rss>

