<?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: checking if there are Values in previousWeek in Dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900931#M313481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sinanozdemir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"this week" means that is is calculated by week related to dimension. so for week2 only id2 was active (which you can see in table1. in week1 there are existing entries for id1 and for id2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; expression "active previous week + active this week" for week2:&amp;nbsp; id1 has no entry in week2, so it will not be counted, id2 has an entry in week2 (active this week) AND an entry in week1 (active in previous week).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so id2 shell be counted -&amp;gt; result = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2015 14:30:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-25T14:30:03Z</dc:date>
    <item>
      <title>checking if there are Values in previousWeek in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900929#M313479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have some trouble to find the right solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let`s say i have following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="175" style="border: 1px solid #000000; width: 506px; height: 175px;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;id&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;week&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;flag&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i´m trying to achieve is following result:&lt;/P&gt;&lt;P&gt;Dimension: week&lt;/P&gt;&lt;P&gt;expressions:&lt;/P&gt;&lt;P&gt;- count all ids which have an entry in previous week and this week --&amp;gt; active previous week + active this week&lt;/P&gt;&lt;P&gt;- count all ids which have no entry in previous week but entry in this week --&amp;gt; active previous week + not active this week&lt;/P&gt;&lt;P&gt;- count all ids which have an entry in previous week but no entry in this week --&amp;gt; not active previous week + active this week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;&lt;STRONG&gt;Week&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;&lt;STRONG&gt;active previous week + active this week&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;&lt;STRONG&gt;active previous week + not active this week&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; padding: 2px; color: #ffffff; background-color: #6690bc; text-align: center;" valign="middle"&gt;&lt;STRONG&gt;not active previous week + active this week&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;-&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I struggeling around for a while an couldn`t find any solution. I tried it with aggr function and above function but have no satisfying results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope somebody can help me! it´s really important&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stevve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 13:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900929#M313479</guid>
      <dc:creator />
      <dc:date>2015-06-25T13:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: checking if there are Values in previousWeek in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900930#M313480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your second table, you are showing in column "active previous week + active this week" for week 2 as 1 so I am a bit confused with this logic. Is week 4 the current week? If so, how is it possible to have 1 for week 2 in active previous week + active this week?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 14:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900930#M313480</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-06-25T14:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: checking if there are Values in previousWeek in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900931#M313481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sinanozdemir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"this week" means that is is calculated by week related to dimension. so for week2 only id2 was active (which you can see in table1. in week1 there are existing entries for id1 and for id2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; expression "active previous week + active this week" for week2:&amp;nbsp; id1 has no entry in week2, so it will not be counted, id2 has an entry in week2 (active this week) AND an entry in week1 (active in previous week).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so id2 shell be counted -&amp;gt; result = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 14:30:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900931#M313481</guid>
      <dc:creator />
      <dc:date>2015-06-25T14:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: checking if there are Values in previousWeek in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900932#M313482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay. I just forgot about this and I remembered when I had to do something similar to your question. Here is my approach and I am hoping it helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I handled everything in the back-end:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/96165_Capture.PNG" style="height: 223px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;And in a straight table, I first pulled week as the first dimension and then I typed below scripts for each column:&lt;/P&gt;&lt;P&gt;For the first column "active previous week + active this week":&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/96166_Capture.PNG" style="height: 134px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;For the second column "active previous week + not active this week":&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/96167_Capture.PNG" style="height: 144px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;For the third column "not active previous week + active this week":&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/96168_Capture.PNG" style="height: 133px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;After that the straight table should look like the below one:&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/96164_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also attaching the qvw and I know this approach seems messy, but I personally think that the order of fields does matter in order to come up with the required measures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 05:25:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/checking-if-there-are-Values-in-previousWeek-in-Dimension/m-p/900932#M313482</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-15T05:25:46Z</dc:date>
    </item>
  </channel>
</rss>

