<?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 Syntax Problem - Previous Quarter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791806#M1210741</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;The above isn't bringing back the results I'd expect, here's an example with the new calculation as per this thread:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dayna_0-1615897375781.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51243i4C8A60593CE47E2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dayna_0-1615897375781.png" alt="Dayna_0-1615897375781.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's what I would expect...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dayna_1-1615897394328.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51244i1FBA2E183B7ADA10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dayna_1-1615897394328.png" alt="Dayna_1-1615897394328.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully the above makes sense to what I'm trying to achieve?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 12:23:25 GMT</pubDate>
    <dc:creator>Dayna</dc:creator>
    <dc:date>2021-03-16T12:23:25Z</dc:date>
    <item>
      <title>Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791353#M1210684</link>
      <description>&lt;P&gt;Hello All!&lt;/P&gt;&lt;P&gt;I'm trying to get the previous quarter, and I think my syntax is slightly out... Here's what I have:&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Applicator_Date={"$(=date(addmonths((Applicator_Date),-3)))"}&amp;gt;}Applicator_Cost)&lt;/P&gt;&lt;P&gt;Applicator_Date is a date field. Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do this in a text box and change it to:&lt;/P&gt;&lt;P&gt;=date(addmonths(max(Applicator_Date),-3)) then I get the result I'd expect for the max date in the calendar, so I'm not sure what I'm missing....&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 11:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791353#M1210684</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-15T11:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791563#M1210704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The set expression is calculated once for the object, i.e. if that is a table is the same for every row.&lt;/P&gt;&lt;P&gt;If you want to show a date, current month and prior quarter (meaning 3 months ago, or meaning accounting quarter end, not sure I understand your data) you could use something like ABOVE function with a suitable offset;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20210315_1.png" style="width: 616px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51189i563EACAB30EDFBC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="20210315_1.png" alt="20210315_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 19:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791563#M1210704</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-03-15T19:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791591#M1210705</link>
      <description>&lt;P&gt;Good morning&lt;/P&gt;&lt;P&gt;The best idea is , to create quarter Field in the script&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'Q' &amp;amp; Ceil(Month([Order Date])/3) As Quarter,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then create Another column that Has : autonumber(&lt;SPAN&gt;'Q' &amp;amp; Ceil(Month([Order Date])/3)&lt;/SPAN&gt;) as QuarterNum&lt;/P&gt;&lt;P&gt;Then in the set analysis you will just do&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;QuarterNum={'$(=max(QuarterNum)-1)'}&amp;gt;}&lt;SPAN&gt;Applicator_Cost)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 22:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791591#M1210705</guid>
      <dc:creator>yassinemhadhbi</dc:creator>
      <dc:date>2021-03-15T22:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791594#M1210706</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In case you don't want to have a calendar with a Quarter field as described by&amp;nbsp;Yassinemhadhbi , you can create a dummy date, 3month after.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Denisg_0-1615846281614.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51195i5CB5B6BC760A8552/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Denisg_0-1615846281614.png" alt="Denisg_0-1615846281614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 22:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791594#M1210706</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-15T22:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791806#M1210741</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;The above isn't bringing back the results I'd expect, here's an example with the new calculation as per this thread:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dayna_0-1615897375781.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51243i4C8A60593CE47E2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dayna_0-1615897375781.png" alt="Dayna_0-1615897375781.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's what I would expect...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dayna_1-1615897394328.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51244i1FBA2E183B7ADA10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dayna_1-1615897394328.png" alt="Dayna_1-1615897394328.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully the above makes sense to what I'm trying to achieve?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791806#M1210741</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-16T12:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791811#M1210742</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Above(Value) as the expression of the « Expected Value » column should do the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:34:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791811#M1210742</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-16T12:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791859#M1210751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/84849"&gt;@Denisg&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;How would you do that in a pivot table where the dimension is on the left hand side, but the quarter timescale at the top? That's where I'd imagine the set analysis one would only look at the previous quarter for the item in question.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 14:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791859#M1210751</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-16T14:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791920#M1210761</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure I understand.&lt;/P&gt;&lt;P&gt;can you please design that table like you did above?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 16:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791920#M1210761</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-16T16:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791924#M1210763</link>
      <description>&lt;P&gt;Yes of course, I've achieved the below so far using PEEK() within the load script, but at the time I thought the Set Analysis approach would be 'safer':&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dayna_0-1615912574140.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51263iCD28D3E1CE1ABC65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dayna_0-1615912574140.png" alt="Dayna_0-1615912574140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So this is a pivot, with the quarter as the dimension at the top, whereas the middle expression should be the value for the previous quarter. This is working using peek in the load script as per:&lt;/P&gt;&lt;P&gt;if(Applicator_ID=peek(Applicator_ID) , peek(Applicator_Cost),null()) as Applicator_PreviousQuarter&lt;/P&gt;&lt;P&gt;However, I was hoping to get the set analysis approach working too!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 16:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791924#M1210763</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-16T16:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791927#M1210765</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There are functions Before and After that work in Pivot Table like Above and Below work in Straight Table.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 16:39:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1791927#M1210765</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2021-03-16T16:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792019#M1210774</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You will find in this attached qvw an example of a Before function with this structure of data. See the Quarter offset on the column headings.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Denis&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 22:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792019#M1210774</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-16T22:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792126#M1210783</link>
      <description>&lt;P&gt;Lovely, thank you! Sorry, can you confirm the place to look for the Quarter offset? I couldn't see this! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 09:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792126#M1210783</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-17T09:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792138#M1210785</link>
      <description>&lt;P&gt;Hi Dayna,&lt;/P&gt;&lt;P&gt;You see here that the right chart is showing a Before Expression. In yellow, the Quarter 2018-Q2 is displaying the data from the left chart in 2018-Q1 (purple)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Denisg_0-1615977394889.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51310i035B66DDD00CCC1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Denisg_0-1615977394889.png" alt="Denisg_0-1615977394889.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 10:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792138#M1210785</guid>
      <dc:creator>Denisg</dc:creator>
      <dc:date>2021-03-17T10:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax Problem - Previous Quarter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792186#M1210789</link>
      <description>&lt;P&gt;Thanks for all your help!!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 13:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax-Problem-Previous-Quarter/m-p/1792186#M1210789</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2021-03-17T13:12:50Z</dc:date>
    </item>
  </channel>
</rss>

