<?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 Question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515543#M1130305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty new to Qlikview and have come across a unique requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to get sum of sales made against a customer for a product. If the user selects a time period (which is in months) say Jan 2013 then the sales of the product sold to the customer in month &lt;EM&gt;&lt;STRONG&gt;Jan 2013&lt;/STRONG&gt;&lt;/EM&gt; should be shown. However along with this I also have to show the sales which happened against the same customer for the same product in &lt;EM&gt;&lt;STRONG&gt;Jan &lt;/STRONG&gt;&lt;STRONG&gt;2012&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve the above part I had used the below expression and I am able to get the result since my Month_Key is in format of YYYYMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month_Key = {$(=max(Month_Key) - 100)}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier the requirement stated that the user will select only one month. This has changed. User should be able to select multiple months now and this makes my above expression useless. &lt;/P&gt;&lt;P&gt;Now based on the months selected by the user I have to provide the sum of&amp;nbsp; sales of those months for current year and last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will I have to use variables to get the sales of last year for the selected months? Is there a simpler way to do it?&lt;/P&gt;&lt;P&gt;I tried searching but was not able to find any material on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2013 06:52:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-13T06:52:46Z</dc:date>
    <item>
      <title>Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515543#M1130305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty new to Qlikview and have come across a unique requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to get sum of sales made against a customer for a product. If the user selects a time period (which is in months) say Jan 2013 then the sales of the product sold to the customer in month &lt;EM&gt;&lt;STRONG&gt;Jan 2013&lt;/STRONG&gt;&lt;/EM&gt; should be shown. However along with this I also have to show the sales which happened against the same customer for the same product in &lt;EM&gt;&lt;STRONG&gt;Jan &lt;/STRONG&gt;&lt;STRONG&gt;2012&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve the above part I had used the below expression and I am able to get the result since my Month_Key is in format of YYYYMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month_Key = {$(=max(Month_Key) - 100)}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier the requirement stated that the user will select only one month. This has changed. User should be able to select multiple months now and this makes my above expression useless. &lt;/P&gt;&lt;P&gt;Now based on the months selected by the user I have to provide the sum of&amp;nbsp; sales of those months for current year and last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will I have to use variables to get the sales of last year for the selected months? Is there a simpler way to do it?&lt;/P&gt;&lt;P&gt;I tried searching but was not able to find any material on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 06:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515543#M1130305</guid>
      <dc:creator />
      <dc:date>2013-11-13T06:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515544#M1130306</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Could you please share the sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 07:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515544#M1130306</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-11-13T07:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515545#M1130307</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;You can use variables in the set analysis, each one for one month and therefore you will be able to subtract the desired month to the current one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a variable vCurrentMonth (or vMaxMonth), vPreviousMaxMonth .... and so on. &lt;/P&gt;&lt;P&gt;Then you can use the following formula &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Month_Key = {$(vPreviousMaxMonth )}&amp;gt;}Sales) , ....&amp;nbsp; depending on each case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 07:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515545#M1130307</guid>
      <dc:creator />
      <dc:date>2013-11-13T07:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515546#M1130308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am preparing the Sample data and will send in sometime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply however what happens if user selects multiple months say JAN 2013, FEB 2013, MAR 2013 together. My issue arises when i have to get the sum of sales of JAN 2012, FEB 2012, MAR 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for helping!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prakhar Vyas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 07:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515546#M1130308</guid>
      <dc:creator />
      <dc:date>2013-11-13T07:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515547#M1130309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prakhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I will use some like the following formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Month_Key = {"&amp;gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=min(Month_Key) - 100)&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=max(Month_Key) - 100)&lt;/SPAN&gt;"&lt;/SPAN&gt;}&amp;gt;}Sales) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or in 2 steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Month_Key = {"&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=min(Month_Key) - 100)"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;}&amp;gt;}Sales) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Month_Key = {"&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=max(Month_Key) - 100)"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;}&amp;gt;}Sales) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 07:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515547#M1130309</guid>
      <dc:creator />
      <dc:date>2013-11-13T07:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515548#M1130310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot! &lt;/P&gt;&lt;P&gt;That worked like a charm:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Prakhar Vyas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 08:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/515548#M1130310</guid>
      <dc:creator />
      <dc:date>2013-11-13T08:12:06Z</dc:date>
    </item>
  </channel>
</rss>

