<?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 combination in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558888#M208625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I could not make the expression work. It always singled out some value, not a combination of both.&lt;/P&gt;&lt;P&gt;Instead I solved it in the script by concatenating the columns into 1, creating 4 different "flags":&lt;/P&gt;&lt;P&gt;00, 01, 10, 11.&lt;/P&gt;&lt;P&gt;I then filtered values out that was lower than 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Valid) &amp;amp; num(if([Whole day absence] = 'H', 1, 0)) as AbsenceFlag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis was then written like:&lt;/P&gt;&lt;P&gt;=sum({&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;RMonth=,&lt;/P&gt;&lt;P&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P&gt;Absence={1},&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AbsenceFlag ={"&amp;gt;0"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;[Absence Time]/60&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the input. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Nov 2013 10:28:59 GMT</pubDate>
    <dc:creator>Jonathan_Alm</dc:creator>
    <dc:date>2013-11-25T10:28:59Z</dc:date>
    <item>
      <title>Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558879#M208616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a chart that shows the absence time for the last 10 weeks in my Dashboard.&lt;/P&gt;&lt;P&gt;This is solved with the following set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;RMonth=,&lt;/P&gt;&lt;P&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P&gt;Absence={1}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;[Absence Time]/60&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have to extend this by looking at a combination of values.&lt;/P&gt;&lt;P&gt;There are two columns: Valid Absence and Whole Day absence. This can be set to 1 or 0, 'NO ' or 'YES'. The tables looks like this:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="74" style="border: 1px solid #000000; width: 270px; height: 44px;"&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;Valid&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;Whole day absence&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;YES&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My set analysis above summarizes all combinations of valid and whole day absence. There can be 4 combinations.&lt;/P&gt;&lt;P&gt;&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;&lt;STRONG&gt;Comb 1&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;Comb 2&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;Comb 3&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;Comb 4&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Valid = 1 AND Whole Day Absence = 'NO'&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Valid = 1 AND Whole day absence = 'YES'&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Valid = 0 AND Whole day absence = 'NO'&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Valid = 0 AND Whole day absence = 'YES'&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I need to filter 1 combination out. And that is when Valid = 0 AND Whole Day Absence = 'NO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when these two values are combined, they shall be excluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me with the syntax to be able to get the summary of absence time for all combinations except "Valid = 0 AND Whole Day Absence = 'NO' "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 11:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558879#M208616</guid>
      <dc:creator>Jonathan_Alm</dc:creator>
      <dc:date>2013-11-21T11:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558880#M208617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do:&lt;/P&gt;&lt;P&gt;{ {Your current set} * {{&amp;lt;valid={0} * [whole day absence]={'NO'}}&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 11:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558880#M208617</guid>
      <dc:creator />
      <dc:date>2013-11-21T11:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558881#M208618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am sorry but I can't quite follow you here. I try to incorporate all those&amp;nbsp; {&amp;nbsp;&amp;nbsp; } but the syntax does not seem right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 12:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558881#M208618</guid>
      <dc:creator>Jonathan_Alm</dc:creator>
      <dc:date>2013-11-21T12:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558882#M208619</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;BR /&gt;What I wanted to do is:&lt;/P&gt;&lt;P&gt;{your set} * {a new set}&lt;/P&gt;&lt;P&gt;it shoudl be an intersection because you reduce the scope. If I remember, the whole set composed of these 2 sets must be enclosed into {}. therefore sth like { {your set} * {a new set} }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new set is also composed of the intersection of two sets: {&amp;lt;valid={0}&amp;gt;} * {&amp;lt;[whole day absence]={'NO'}&amp;gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with the set analysis is that they become rapidly very hard to write, read and maintain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:01:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558882#M208619</guid>
      <dc:creator />
      <dc:date>2013-11-21T13:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558883#M208620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=sum({&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$&amp;lt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RMonth=,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Absence={1},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ValidAbsence-={0},&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;WholeDayAbsence-={'NO'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Absence Time]/60&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558883#M208620</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-11-21T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558884#M208621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I write the syntax like that, the set analysis will filter out all combinations where whole day absence is set to 'NO' (combination 1 and 3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So unfortunately I cannot write it like that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 15:03:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558884#M208621</guid>
      <dc:creator>Jonathan_Alm</dc:creator>
      <dc:date>2013-11-21T15:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558885#M208622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum({&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$&amp;lt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RMonth=,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Absence={1}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt; *&amp;lt;&lt;STRONG&gt;WholeDayAbsence-={'NO'}&amp;gt; * &amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;ValidAbsence-={0}&lt;/STRONG&gt;&lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt;}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Absence Time]/60&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 15:29:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558885#M208622</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-11-21T15:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558886#M208623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;RMonth=,&lt;/P&gt;&lt;P&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P&gt;Absence={1}&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #008000;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt; &amp;lt;Valid={0}, [Whole Day Absence]={NO}&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;[Absence Time]/60&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or the old tried and true IF method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;RMonth=,&lt;/P&gt;&lt;P&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P&gt;Absence={1}&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008000;"&gt;if( Valid&amp;lt;&amp;gt;0 or [Whole Day Absence]&amp;lt;&amp;gt;'NO',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[Absence Time]/60&lt;STRONG style="color: #008000;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 07:41:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558886#M208623</guid>
      <dc:creator />
      <dc:date>2013-11-22T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558887#M208624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an addition, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came across something In set analysis, that&lt;/P&gt;&lt;P&gt;instead of using &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Absence={1}&lt;/SPAN&gt;,&amp;nbsp; this &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Absence={"=1"} works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 09:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558887#M208624</guid>
      <dc:creator />
      <dc:date>2013-11-22T09:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis combination</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558888#M208625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I could not make the expression work. It always singled out some value, not a combination of both.&lt;/P&gt;&lt;P&gt;Instead I solved it in the script by concatenating the columns into 1, creating 4 different "flags":&lt;/P&gt;&lt;P&gt;00, 01, 10, 11.&lt;/P&gt;&lt;P&gt;I then filtered values out that was lower than 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Valid) &amp;amp; num(if([Whole day absence] = 'H', 1, 0)) as AbsenceFlag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis was then written like:&lt;/P&gt;&lt;P&gt;=sum({&lt;/P&gt;&lt;P&gt;$&amp;lt;&lt;/P&gt;&lt;P&gt;RMonth=,&lt;/P&gt;&lt;P&gt;CalendarYear={$(=max(CalendarYear))},&lt;/P&gt;&lt;P&gt;CalendarWeek={"&amp;gt;$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek)-10)"} * {"&amp;lt;=$(=max({&amp;lt;CalendarYear={$(=Max(CalendarYear))}&amp;gt;}CalendarWeek))"},&lt;/P&gt;&lt;P&gt;Absence={1},&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AbsenceFlag ={"&amp;gt;0"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;[Absence Time]/60&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the input. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 10:28:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combination/m-p/558888#M208625</guid>
      <dc:creator>Jonathan_Alm</dc:creator>
      <dc:date>2013-11-25T10:28:59Z</dc:date>
    </item>
  </channel>
</rss>

