<?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 When to use set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170740#M41039</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the problem with my expression was that I needed the "total" keyword in several spots. Here's the revised expression, and see attached for it working in context:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if (Month=max({1} &lt;STRONG&gt;total&lt;/STRONG&gt; Month)&lt;BR /&gt;and sum("Point of Sales")=0&lt;BR /&gt; ,sum({&amp;lt;Month={'$(=date(addmonths(max({1} &lt;STRONG&gt;total&lt;/STRONG&gt; Month),-1),'MMM YY'))'}&amp;gt;} &lt;STRONG&gt;total&lt;/STRONG&gt; "Point of Sales")&lt;BR /&gt; ,sum("Point of Sales"))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2009 02:49:09 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2009-09-04T02:49:09Z</dc:date>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170735#M41034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I inventory application based on monthly selection. If user select current month then saels and inventory is summed but, there one set of data that may not have month values. This data is Point of sales data. Usually this data is available until the middle of the current month for previous month.&lt;/P&gt;&lt;P&gt;With that being said if user is using appliation in Aug Point of sales values will be zero. I need to the chart to pull the previous month value if there is not current month data, but if current month data is available then use current month value.&lt;/P&gt;&lt;P&gt;How can I handle this? Do I need to use Set Analysis. If yes, what syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2009 04:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170735#M41034</guid>
      <dc:creator>karensmith</dc:creator>
      <dc:date>2009-08-30T04:08:05Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170736#M41035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd suggest to solve the last question in the load script - determine what is the most recent available data (current month or prior month) and load it as the "Latest Available Number".&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2009 00:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170736#M41035</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-08-31T00:14:55Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170737#M41036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would handle it in the load script as well.&lt;/P&gt;&lt;P&gt;If you prefer to handle it with an expression, then probably something like this (untested, and may need to be changed a bit based on your field names and definitions):&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if (Month=max({1}Month)&lt;BR /&gt;and sum("Point of Sales")=0&lt;BR /&gt; ,sum({&amp;lt;Month={'$(=date(addmonths(max({1}Month),-1),'MMM YY'))'}&amp;gt;}"Point of Sales")&lt;BR /&gt; ,sum("Point of Sales"))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 01:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170737#M41036</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-01T01:28:01Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170738#M41037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the recommendation John. I would prefer to handle this on the user interface, but your recommend syntax did not work. I didn't know you could set analysis in a if statement....interesting...when selction for previous month is selected from the listbox value is displayed, but when current month is selected no values are displayed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 10:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170738#M41037</guid>
      <dc:creator>karensmith</dc:creator>
      <dc:date>2009-09-03T10:11:15Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170739#M41038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks once again Oleg!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 22:46:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170739#M41038</guid>
      <dc:creator>karensmith</dc:creator>
      <dc:date>2009-09-03T22:46:36Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170740#M41039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the problem with my expression was that I needed the "total" keyword in several spots. Here's the revised expression, and see attached for it working in context:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if (Month=max({1} &lt;STRONG&gt;total&lt;/STRONG&gt; Month)&lt;BR /&gt;and sum("Point of Sales")=0&lt;BR /&gt; ,sum({&amp;lt;Month={'$(=date(addmonths(max({1} &lt;STRONG&gt;total&lt;/STRONG&gt; Month),-1),'MMM YY'))'}&amp;gt;} &lt;STRONG&gt;total&lt;/STRONG&gt; "Point of Sales")&lt;BR /&gt; ,sum("Point of Sales"))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 02:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170740#M41039</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-04T02:49:09Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170741#M41040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;If no data was available in the prior month, could a loop be inserted into the SA part to grab the last known value whenever that might be?&lt;/P&gt;&lt;P&gt;Sincerely - Robt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 03:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170741#M41040</guid>
      <dc:creator />
      <dc:date>2009-09-04T03:24:26Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170742#M41041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I'm not thinking of a way to insert a loop. Again, fairly straightforward in the script, as you'd just load in month order, and grab the previous month's value if the current month you're loading is 0. You can mimic the same thing in the chart with the above() function. But I like to avoid that, because it literally takes what is above it in the chart, so if you make selections or change the sort order, it will change what is displayed.&lt;/P&gt;&lt;P&gt;Anyway, here are those two approaches added to the example along with some more missing data to show the differences.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 05:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170742#M41041</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-04T05:17:58Z</dc:date>
    </item>
    <item>
      <title>When to use set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170743#M41042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;Thanks for going back and updating expression. I did download your application, but not sure what to truly expect. It seem to work for one or two selections, but then only show the show based on what was truly selected.&lt;/P&gt;&lt;P&gt;When I retype your syntax I get no results. I ideally I would like the use to select month and based on selction calculate the previous or current month. FY month is not a field in my chart. I tried it both ways, but still nothing. What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'}&amp;gt;} total POS_Qty),sum(POS_Qty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(FYMonth=max({1} total FYMonth) and sum(POS_Qty)=0,sum({&amp;lt;FYMonth={&lt;B&gt;&lt;I&gt;'$(=date(addmonths(max({1} total FYMonth),-1),'&lt;/I&gt;&lt;/B&gt;MMM YY'))&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0882.sampleselect.bmp"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/0882.sampleselect.bmp" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 20:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/When-to-use-set-analysis/m-p/170743#M41042</guid>
      <dc:creator>karensmith</dc:creator>
      <dc:date>2009-09-04T20:08:16Z</dc:date>
    </item>
  </channel>
</rss>

