<?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 Help with Set Analysis Syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172019#M503719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As QlikView doesn't work with data types, it's very useful to say QlikView which kind of information you are working with. The hash mark means "numeric". $(#QuarterIndex) means numeric value of QuarterIndex, as you are going to do some maths with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 14:10:21 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2009-12-03T14:10:21Z</dc:date>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172014#M503714</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'm trying to create a chart which represents a change in growth. The calculation would compare sales for this quarter compared to sales in the same quarter of the prior year. To support this function I created a QuarterIndex field. For example:&lt;/P&gt;&lt;P&gt;YearQtr QuarterIndex POSQty&lt;BR /&gt;2009-Q3 11 15,000&lt;BR /&gt;2008-Q3 7 10,000&lt;/P&gt;&lt;P&gt;The formula is: (2009-Q3 POSQty / 2008-Q3 POSQty) - 1&lt;/P&gt;&lt;P&gt;I tried this expression, but it doesn't work: (sum(POSQty) / sum( {$&amp;lt;QtrIndex= {"QtrIndex - 4"}&amp;gt;} POSQty )) - 1&lt;/P&gt;&lt;P&gt;Can someone help me with the correct syntax?&lt;/P&gt;&lt;P&gt;Thank you in advance for any help you can give. I'm open to any suggestions, since I've tried many variations over the past 3 days to no avail. I'm completely out of ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 14:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172014#M503714</guid>
      <dc:creator />
      <dc:date>2009-12-02T14:28:22Z</dc:date>
    </item>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172015#M503715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can compare quarters and substracting one year to that with something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;(sum(POSQty) / sum( {$&amp;lt;YearQtr = {$(#=QuarterName(Date(timestamp#(YearQtr,'YYYY-MMM'))-4))}&amp;gt;} POSQty )) - 1&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;For that I'd recommend you to use some different timestamp for your YearQtr field, to same something like '2009 abr-jun' in spite of how are you going to display your quarters in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 14:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172015#M503715</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2009-12-02T14:45:06Z</dc:date>
    </item>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172016#M503716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but we're using 16-week quarters, so it is not as easy as subtracting months.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 17:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172016#M503716</guid>
      <dc:creator />
      <dc:date>2009-12-02T17:58:52Z</dc:date>
    </item>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172017#M503717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you need to take into account only the quarter index:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt; QuarterIndex = {"11"} &amp;gt;} POSQty) / Sum({$&amp;lt; QuarterIndex = {$(#QuarterIndex)-4} &amp;gt;} POSQty) - 1&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Use a variable to store current QuarterIndex so you can change {"11"} in the expression above for {$(#vCurrentQuarterIndex)} (i. e)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 18:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172017#M503717</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2009-12-02T18:22:16Z</dc:date>
    </item>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172018#M503718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Miguel! Out of curiousity, why the hash mark? I haven't seen this before $(#QuarterIndex)???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 20:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172018#M503718</guid>
      <dc:creator />
      <dc:date>2009-12-02T20:27:44Z</dc:date>
    </item>
    <item>
      <title>Help with Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172019#M503719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As QlikView doesn't work with data types, it's very useful to say QlikView which kind of information you are working with. The hash mark means "numeric". $(#QuarterIndex) means numeric value of QuarterIndex, as you are going to do some maths with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 14:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Set-Analysis-Syntax/m-p/172019#M503719</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2009-12-03T14:10:21Z</dc:date>
    </item>
  </channel>
</rss>

