<?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 problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715224#M1082935</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;start with attached url to have a bigger picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 07:42:57 GMT</pubDate>
    <dc:creator>ashfaq_haseeb</dc:creator>
    <dc:date>2014-06-20T07:42:57Z</dc:date>
    <item>
      <title>Set analysis problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715221#M1082932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I hope someone can tell me if there is a chance I can get my idea to work. Assume a table with 'ordernumber' and 'orderdate'. From the 'orderdate' a master calendar is created. So a simple calculation would be to count the 'ordernumber'. This way I can view the number of orders placed per timeframe. Assume I want selections on Year and Month. My Master calendar provides this. So I can view the number of orders per month, year combination. If I would also show in my table the number of orders of previous month I can do so by using a function in my expression for current date and calculate back a month. But that is sort of a static view in time, current month versus previous month. What I want is current selected period versus previous selected period. To start simple assume I have to select a month. So if I select March as month my next column would need to show the count of February. I need to use set analysis (assumption) and I need to exclude the month selection from the expression, but how can I use it anyhow to calculate the previous month? I have tried various examples but to no avail. I would be thrilled to have a working solution for above. I would be more thrilled if there was a way to determine the selected period. For example I only select year that it would show the count of the previous year. Hope someone can help me out. Johan Breukelaar &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715221#M1082932</guid>
      <dc:creator>breukelaarj</dc:creator>
      <dc:date>2014-06-20T07:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715222#M1082933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No duplicate post please: &lt;A href="https://community.qlik.com/message/552851"&gt;Re: Set analysis with / without current selections&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715222#M1082933</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-20T07:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715223#M1082934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an easy way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assume that your expression for current selected month is&lt;/P&gt;&lt;P&gt;Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for the previous month is&lt;/P&gt;&lt;P&gt;Sum({$ &amp;lt;month={'$(=getfieldselection(month)-1)'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately this expression works from february because if you select january (1) then 1-1 is 0 and no selection will be made for previous period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way could be using the script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose you have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;month,&lt;/P&gt;&lt;P&gt;year&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;resident myCalendar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add the field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;month,&lt;/P&gt;&lt;P&gt;Addmonth(makedate(year, month,1), -1) as prevMonth&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;resident myCalendar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715223#M1082934</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-06-20T07:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715224#M1082935</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;start with attached url to have a bigger picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-problem/m-p/715224#M1082935</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-06-20T07:42:57Z</dc:date>
    </item>
  </channel>
</rss>

