<?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 Set analysis(?) challenge in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284896#M584763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;H5&gt;&lt;/H5&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Challenge: &lt;/P&gt;&lt;P&gt;- Show, in a pivot table, for each date in, the accumulated &lt;EM&gt;planning &lt;/EM&gt;for the coming 5 days&lt;/P&gt;&lt;P&gt;- Show maximum 5 dates starting the last date in the selection &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example, if sep 22nd is selected, for each date, show the accumulated planning for the coming 5 days = (DateX) + (DateX+1) + (DateX+2)+ (DateX+3)+ (DateX+4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Date (calculated) dimmension&lt;/H4&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=If(RefDate &amp;lt;= '$(vceMaxDate)' and RefDate &amp;gt;= '$(vceMinDate)',RefDate)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RefDate &lt;/EM&gt;field - Date from date island (not connected to the rest of the data model)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vceMinDate &lt;/EM&gt;variable - should be the&amp;nbsp; last date on selection = Max(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vceMaxDate &lt;/EM&gt;variable&amp;nbsp; = &lt;EM&gt;vceMinDate&amp;nbsp; + 4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Challenge1: calculated dimmension does not allow aggregation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Planning expression&lt;/H4&gt;&lt;P&gt;Sum(If(Date &amp;gt;= aggr(NODISTINCT max(RefDate),MachineId,RefDate) and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date &amp;lt;= Date(aggr(NODISTINCT max(RefDate),MachineId,RefDate)+4),planning)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not work when a single date is selected. Qlikview will, then, only show the planning for that single day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This calls for Set Analysis but as far as i know, it calculates one time per object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Challenge2: use set analysis to accumulate planning but disregarding date selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appericiate your help, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;DIV id="-chrome-auto-translate-plugin-dialog" style="opacity: 1 !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; position: absolute !important; top: 0px; left: 0px; overflow-x: visible !important; overflow-y: visible !important; z-index: 999999 !important; text-align: left !important; display: none; background-position: initial initial !important; background-repeat: initial initial !important; padding: 0px !important; margin: 0px !important;"&gt;&lt;DIV style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left  !important;"&gt;&lt;DIV class="translate"&gt; &lt;/DIV&gt;&lt;DIV class="additional"&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;IMG onclick="" src="http://www.google.com/uds/css/small-logo.png" style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" /&gt;JHi&lt;P&gt;Challenge: &lt;/P&gt;&lt;P&gt;- Show in a pivot table, for each date in the selected week, the accumulated planning for the coming 5 days&lt;/P&gt;&lt;P&gt;- For example, if sep 22nd is selected, for each passing 5 days, show the accumulated planning for the coming 5 days = (DateX) + (DateX+1) + (DateX+2)+ (DateX+3)+ (DateX+4)k&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Sep 2011 09:28:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-23T09:28:11Z</dc:date>
    <item>
      <title>Set analysis(?) challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284896#M584763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;H5&gt;&lt;/H5&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Challenge: &lt;/P&gt;&lt;P&gt;- Show, in a pivot table, for each date in, the accumulated &lt;EM&gt;planning &lt;/EM&gt;for the coming 5 days&lt;/P&gt;&lt;P&gt;- Show maximum 5 dates starting the last date in the selection &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example, if sep 22nd is selected, for each date, show the accumulated planning for the coming 5 days = (DateX) + (DateX+1) + (DateX+2)+ (DateX+3)+ (DateX+4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Date (calculated) dimmension&lt;/H4&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=If(RefDate &amp;lt;= '$(vceMaxDate)' and RefDate &amp;gt;= '$(vceMinDate)',RefDate)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RefDate &lt;/EM&gt;field - Date from date island (not connected to the rest of the data model)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vceMinDate &lt;/EM&gt;variable - should be the&amp;nbsp; last date on selection = Max(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vceMaxDate &lt;/EM&gt;variable&amp;nbsp; = &lt;EM&gt;vceMinDate&amp;nbsp; + 4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Challenge1: calculated dimmension does not allow aggregation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Planning expression&lt;/H4&gt;&lt;P&gt;Sum(If(Date &amp;gt;= aggr(NODISTINCT max(RefDate),MachineId,RefDate) and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date &amp;lt;= Date(aggr(NODISTINCT max(RefDate),MachineId,RefDate)+4),planning)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not work when a single date is selected. Qlikview will, then, only show the planning for that single day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This calls for Set Analysis but as far as i know, it calculates one time per object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Challenge2: use set analysis to accumulate planning but disregarding date selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;appericiate your help, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;DIV id="-chrome-auto-translate-plugin-dialog" style="opacity: 1 !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; position: absolute !important; top: 0px; left: 0px; overflow-x: visible !important; overflow-y: visible !important; z-index: 999999 !important; text-align: left !important; display: none; background-position: initial initial !important; background-repeat: initial initial !important; padding: 0px !important; margin: 0px !important;"&gt;&lt;DIV style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left  !important;"&gt;&lt;DIV class="translate"&gt; &lt;/DIV&gt;&lt;DIV class="additional"&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;IMG onclick="" src="http://www.google.com/uds/css/small-logo.png" style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" /&gt;JHi&lt;P&gt;Challenge: &lt;/P&gt;&lt;P&gt;- Show in a pivot table, for each date in the selected week, the accumulated planning for the coming 5 days&lt;/P&gt;&lt;P&gt;- For example, if sep 22nd is selected, for each passing 5 days, show the accumulated planning for the coming 5 days = (DateX) + (DateX+1) + (DateX+2)+ (DateX+3)+ (DateX+4)k&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 09:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284896#M584763</guid>
      <dc:creator />
      <dc:date>2011-09-23T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis(?) challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284897#M584764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi drorsvr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe like attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just added a set identifier {1} to your table expression. And set your vceminDate Variable to =max(Date) (I think your calendar input box is somehow contra productive here).&lt;/P&gt;&lt;P&gt;So if I select a Date from the list box a the right, I should get the correct planning for following 5 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 09:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284897#M584764</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-23T09:53:36Z</dc:date>
    </item>
    <item>
      <title>Set analysis(?) challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284898#M584765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 11:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-challenge/m-p/284898#M584765</guid>
      <dc:creator />
      <dc:date>2011-09-23T11:01:33Z</dc:date>
    </item>
  </channel>
</rss>

