<?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 Same Store Sale Indicator in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312497#M115396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, we need to rebuild the sum of rows in a pivot table using advanced aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(if(Sum(if(Date=SSSDate-364,Sales)&amp;gt;0),sum(if(Date=SSSDate,Sales))),SSSDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(use this as expression in the pivot table)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2011 20:56:02 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-08-31T20:56:02Z</dc:date>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312488#M115387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I´m trying to create a SSS indicator (on a pivot table) to compare sales 364 days after the selected date, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum sales if 364 day ago Sales&amp;lt;&amp;gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I create this value? please any help is more than welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 21:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312488#M115387</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-30T21:51:33Z</dc:date>
    </item>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312489#M115388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Camilo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your problem is similar to the problem I just worked on here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/34402?tstart=0"&gt;http://community.qlik.com/thread/34402?tstart=0&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably want to limit your sums to shorter period of times, you mentioned day period, so the set analysis looks maybe like &lt;/P&gt;&lt;P&gt;{&amp;lt;Date = {"=$(=max(Date))"} &amp;gt;}&lt;/P&gt;&lt;P&gt;resp&lt;/P&gt;&lt;P&gt;{&amp;lt;Date = {"=$(=max(Date)-364)"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you have to adapt the check for Qty &amp;gt; 0 according to your sum of Sales requirement, but that should be easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 23:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312489#M115388</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-30T23:33:13Z</dc:date>
    </item>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312490#M115389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m trying to use your aproach but probably I´m not using it properly, this is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum({&amp;lt;Fecha={"$(=(Fecha)-364)"}&amp;gt;}Venta6.0) &amp;gt;0, sum(Venta6.0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I´m trying to do is to go 364 day before each selected date and see if sales were bigger than zero if that the case sum the selected dates sales (not including sales of the selected dates wich didn´t had any sales 364 days before).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please if I´m not being clear enough tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venta6.0 = Sales&lt;/P&gt;&lt;P&gt;Fecha= Date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 14:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312490#M115389</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-31T14:46:39Z</dc:date>
    </item>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312491#M115390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fecha is a field, so $(=(Fecha)-364) is not giving a unique answer (unless you selected exact one value from field). Also I think there should be an equal sign before the dollar sign. &lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;=if(sum({&amp;lt;Fecha={"=$(=max(Fecha)-364)"}&amp;gt;}Venta6.0) &amp;gt;0, sum(Venta6.0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to limit the date. And you may also need to clear any other date field in the set expression, like Year, Month:&lt;/P&gt;&lt;P&gt;=if(sum({&amp;lt;Fecha={"=$(=max(Fecha)-364)"}, Mes= &amp;gt;}Venta6.0) &amp;gt;0, sum(Venta6.0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it's possible to use the set identifier 1 instead of $, this will disregard your current selections:&lt;/P&gt;&lt;P&gt;=if(sum({1&amp;lt;Fecha={"=$(=max(Fecha)-364)"}&amp;gt;}Venta6.0) &amp;gt;0, sum(Venta6.0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 15:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312491#M115390</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-31T15:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312492#M115391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m trying your approach but the total sales are bigger than it should, I think that using max(Date) doesn´t allow a full comparision between date sales?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m attaching an example hoping to clarify what I´m saying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 15:48:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312492#M115391</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-31T15:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312493#M115392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very interesting but "Same Store Sales" is a very fundamental measure in the retail space if it were me I would not mess around trying to calculate it in a chart. If you put a Same store sales flag in your fact table then you could multiply the sales amounts by the flag and get the appropriate total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I assume on your fact table you have store and data of sale so if you add the store open date you can then&amp;nbsp; evaluate the difference between the Date of sale and the Open Date and set the flag based on whatever threshold is appropriate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 17:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312493#M115392</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2011-08-31T17:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312494#M115393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris and Camilo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I wouldn't trust that the calculations in the chart are as accurate as in the script in principle, I think I could stop working with QlikView. Currently we are just throwing in some ideas how to get the things done, I believe nobody wants to get into production without a thorough V&amp;amp;V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also prefer a more simple solution over a more complex one, so if SSS is all about the store opening date, Chris' suggestion using just the opening (or first selling date) is probably a good idea. I was assuming that we need to take the Sales comparision with 52 weeks back as given requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo, if you still need the comparison with the sales amount 52 weeks back for any given date, I worked out a solution, please find attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I corrected the expression (Look at the expression in the text box, I changed the search expression to a literal, not sure yet why the first has not worked.&lt;/P&gt;&lt;P&gt;So, if you select a single date in the bottom left, you should get the correct result in the text box next to it (for a single selected date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I assume you need a date range (like in a chart or table). I think that is problematic with the current solution, because the date as dimension conflicts with the date used in the set expression. &lt;/P&gt;&lt;P&gt;To work around this, I created a separate date field in the script, just as timeline for the tabe/graph. Please look at the second tab in the attached application.&lt;/P&gt;&lt;P&gt;Having the separate time line, you can use simple if-statements to check for past sales and filter the data accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 19:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312494#M115393</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-31T19:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312495#M115394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Chris I already did what you say using the open date and using something like (Open Date &amp;lt;= Date-364) but at least here SSS is based on a day to day basis, If I just use the open date I will be taking into account those days that didn´t had any sales last year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312495#M115394</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-31T20:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312496#M115395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In deed I need date ranges, I think you are very close on your aproach using an auxiliary date, but I´m using pivot tables and when I transform your Straight Table to a Pivot one a got discrepancies on the agregated data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m attaching your example with the pivot table I´m talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312496#M115395</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-31T20:44:08Z</dc:date>
    </item>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312497#M115396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, we need to rebuild the sum of rows in a pivot table using advanced aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(if(Sum(if(Date=SSSDate-364,Sales)&amp;gt;0),sum(if(Date=SSSDate,Sales))),SSSDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(use this as expression in the pivot table)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 20:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312497#M115396</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-31T20:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312498#M115397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does work on the example!! but it seems that a triple if is too much for my qvw it doesn´t show any data just a red cross &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; on the pivot table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 23:03:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312498#M115397</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-31T23:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312499#M115398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's too bad &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, if the 52 weeks are a fixed parameter, I guess we could really use a flag in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; It would be a bit more complicated than a simple StoreOpenDate, we have to calculate the Sales sums per Store and Date, check for any given Date the sums 52 weeks back and there we go, maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSSales:&lt;/P&gt;&lt;P&gt;LOAD Date as Date,&lt;/P&gt;&lt;P&gt;Local,&lt;/P&gt;&lt;P&gt;Local &amp;amp;'-'&amp;amp; num(Date) as LocalDate,&lt;/P&gt;&lt;P&gt;sum(Sales) as SumSales&lt;/P&gt;&lt;P&gt;resident Input group by Local, Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSDates:&lt;/P&gt;&lt;P&gt;left join (Input) Load Date, Local, &lt;/P&gt;&lt;P&gt;if (Lookup('SumSales','LocalDate',Local&amp;amp;'-'&amp;amp;num(Date-364),'SSSSales')&amp;gt;0, 1) as SSS&lt;/P&gt;&lt;P&gt;Resident SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at attached sample, I added a second store too ensure we got the SSS correct per Store (look at the demo date in load script, only 31.8./1.9.2010 differing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 12:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312499#M115398</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-01T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312500#M115399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked perfectly!!!!&lt;/P&gt;&lt;P&gt;The loading time went from 2:30 to 7:30 but then I can use swiftly the qv model &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again Stefan!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 19:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312500#M115399</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-09-01T19:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312501#M115400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is posible to add a condition to restrict the SSS so it doesn´t include last year sales if this year sale were equal 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSSales:&lt;/P&gt;&lt;P&gt;LOAD Fecha as Fecha,&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;ID &amp;amp;'-'&amp;amp; num(Fecha) as LocalDate,&lt;/P&gt;&lt;P&gt;sum(Venta6.0) as SumSales&lt;/P&gt;&lt;P&gt;resident Stage1.2 group by ID, Fecha;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSDates:&lt;/P&gt;&lt;P&gt;left join (Stage1.2) Load Fecha, ID, &lt;/P&gt;&lt;P&gt;if ((Lookup('SumSales','LocalDate',ID&amp;amp;'-'&amp;amp;num(Fecha-364),'SSSSales')&amp;gt;0) &lt;STRONG&gt;and (ID&amp;amp;num(Fecha), 'SumSales')&amp;gt;0&lt;/STRONG&gt; , 1) as SSS&lt;/P&gt;&lt;P&gt;Resident SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table SSSSales;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 17:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312501#M115400</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-09-02T17:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312502#M115401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Camilo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's quite simple, since in SSSDates, we are already having the data you need at hand, just use 'and SumSales&amp;gt;0':&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSDates:&lt;/P&gt;&lt;P&gt;left join (Input) Load Date, Local,&lt;/P&gt;&lt;P&gt;if (Lookup('SumSales','LocalDate',Local&amp;amp;'-'&amp;amp;num(Date-364),'SSSSales')&amp;gt;0 and SumSales &amp;gt;0, 1) as SSS&lt;/P&gt;&lt;P&gt;Resident SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in your table, if SumSales =0, it will be removed anyway from the table, won't it? Or do you need a count of SSS?&lt;/P&gt;&lt;P&gt;Or have I missed something in your question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 12:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312502#M115401</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-03T12:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312503#M115402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don´t need a count of SSS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tryed using: if (Lookup('SumSales','LocalDate',Local&amp;amp;'-'&amp;amp;num(Date-364),'SSSSales')&amp;gt;0 &lt;STRONG&gt;and SumSales &amp;gt;0&lt;/STRONG&gt;, 1) as SSS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don´t see any diference on the Sales totals and I´m sure that some days this year didn´t had any sales.&lt;/P&gt;&lt;P&gt;Maybe SumSales&amp;gt;0 isn´t differentiating by Local?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 22:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312503#M115402</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-09-05T22:35:38Z</dc:date>
    </item>
    <item>
      <title>Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312504#M115403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that I don't understand your requirement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use above line in the load and set a Sales on an abitrary date to zero, this date will be SSS flagged '0'. Same with the dates with SumSales = 0 364 days before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But anyway (regardless if SSS is set to 1 or 0 on these days), if the sum of Sales on these dates is zero, how should they influence the Sales totals?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give me an example, maybe together with an update of the inline load of my last script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 22:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312504#M115403</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-05T22:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312505#M115404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm I´m puzzled right now, I just try what I was talking about on your example and it does work without any problems!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A 0 sales today influences the SSS in that I wont consider the sales 364 days before for that store.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´ll try to figure out what is going on to ask with more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Stefan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 23:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312505#M115404</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-09-05T23:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312506#M115405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I´m trying to get a better understanding of how this work doing somehing similar to another model wich has only years and months (in number format and separate fields). I´m trying to create a sss, but y got a script error sayin that it has an Invalid expression.&lt;/P&gt;&lt;P&gt;Do you know what could be wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSSales:&lt;/P&gt;&lt;P&gt;LOAD AñoMes as AñoMes,&lt;/P&gt;&lt;P&gt;Año,&lt;/P&gt;&lt;P&gt;Mes,&lt;/P&gt;&lt;P&gt;Local,&lt;/P&gt;&lt;P&gt;Local &amp;amp;'-'&amp;amp; num(AñoMes) as LocalDate,&lt;/P&gt;&lt;P&gt;sum(Real) as SumSales&lt;/P&gt;&lt;P&gt;resident Data group by Local, AñoMes;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SSSDates:&lt;/P&gt;&lt;P&gt;left join (Data) Load AñoMes, Local, &lt;/P&gt;&lt;P&gt;if (Lookup('SumSales','LocalDate',Local&amp;amp;'-'&amp;amp;(Año-1)&amp;amp;'-'&amp;amp;(Mes),'SSSSales')&amp;gt;0, 1) as SSS&lt;/P&gt;&lt;P&gt;Resident SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table SSSSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------&lt;/P&gt;&lt;P&gt;PS.&lt;/P&gt;&lt;P&gt;Año=Year&lt;/P&gt;&lt;P&gt;Mes=Month&lt;/P&gt;&lt;P&gt;Año &amp;amp;'-'&amp;amp; Mes as AñoMes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Camilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 15:45:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312506#M115405</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-09-07T15:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Sale Indicator</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312507#M115406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use group by, you can only use fields stated in the group by clause as stand alone fields in the load, so in your example, Ano and Mes are not allowed standalone. You could use them in an aggregation function, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe add Ano and Mes to your group by clause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 15:56:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-Sale-Indicator/m-p/312507#M115406</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-07T15:56:19Z</dc:date>
    </item>
  </channel>
</rss>

