<?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: Previous day set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765645#M1032393</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Max([Dt])-1&lt;/STRONG&gt; - fails for first row....&lt;/P&gt;&lt;P&gt;and in addition for any row where Max-1 gives date that does not exist in Cal Day Column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 06:37:27 GMT</pubDate>
    <dc:creator>robert_mika</dc:creator>
    <dc:date>2015-02-09T06:37:27Z</dc:date>
    <item>
      <title>Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765639#M1032387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following Chart type Straight Table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/77380_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cal Date&lt;/STRONG&gt; is the dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current&lt;/STRONG&gt; is an expression as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Cal Day]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;=$(=Max([Cal Day]))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Sales Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"SPOT"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Sales Qty]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous&lt;/STRONG&gt; is an expression as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While using the the &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(1)) &lt;/SPAN&gt;yielded the result that I wanted, which is to display the previous day current values, I was wondering if I could express it in the form of a set analysis expression like what I did on &lt;STRONG&gt;Current&lt;/STRONG&gt; rather than using the &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;())&lt;/SPAN&gt; function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone show me the correct way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your kind attention guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Khairul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 05:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765639#M1032387</guid>
      <dc:creator />
      <dc:date>2015-02-09T05:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765640#M1032388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using set analysis would not be an easy way in this case, because set analysis doesn't evaluate row-wise but once for a chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 05:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765640#M1032388</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-02-09T05:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765641#M1032389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Khairul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should keep in mind that the Set Analysis expression is performed only once, before the chart is generated. It is not performed for each line of the chart, and therefore it cannot be sensitive to the Dimension values in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your "Current" expression works because the Date is used as the dimension, and therefore the current sales for that date are displayed by default. Set Analysis has nothing to do with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to implement a universal solution that can allow showing Current and Previous for Dates, Weeks, Months, etc... - you need to implement a data modeling solution called "As of Date". There are many documents that explain how to build the "As of Date" table, including my blog at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;www.naturalsynergies.com/blog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Oleg Troyansky&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;www.masterssummit.com&lt;/STRONG&gt; - take your QlikView skills to the next level!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 06:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765641#M1032389</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-02-09T06:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765642#M1032390</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;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Cal Day]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;=$(=Max([Cal Day])-1)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Sales Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"SPOT"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Sales Qty]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Krishna&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 06:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765642#M1032390</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2015-02-09T06:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765643#M1032391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume [Cal Day] is a data counter in your script. Use below expression&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14234619750588157 jive_text_macro jive_macro_code" jivemacro_uid="_14234619750588157" modifiedtitle="true"&gt;
&lt;P&gt;Sum({&amp;lt; [Cal Day]={"$(=Max([Cal Day]))-1"}, [Sales Type]={"SPOT"}&amp;gt;}[Sales Qty])&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 06:09:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765643#M1032391</guid>
      <dc:creator>AbhijitBansode</dc:creator>
      <dc:date>2015-02-09T06:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765644#M1032392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is not possible using set analysis, because the set analysis is calculated at chart level but not by row level, instead if you want to do it in front end we need to use Above() or if you want to do it in backend you can use Peek() or Prev().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 06:24:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765644#M1032392</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-02-09T06:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765645#M1032393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Max([Dt])-1&lt;/STRONG&gt; - fails for first row....&lt;/P&gt;&lt;P&gt;and in addition for any row where Max-1 gives date that does not exist in Cal Day Column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 06:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765645#M1032393</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-02-09T06:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Previous day set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765646#M1032394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your kind attention. It gave me another understanding of set analysis. I have thought so when I could not find any sample to do so. Guess got to go the with the above() function or do it in my ETL scripting then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Khairul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 08:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-day-set-analysis/m-p/765646#M1032394</guid>
      <dc:creator />
      <dc:date>2015-02-11T08:07:04Z</dc:date>
    </item>
  </channel>
</rss>

