<?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: Same Store analysis - Count and Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818547#M288598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Alkesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that the store 123 don't have sales in year 2009...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2014 11:46:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-11-12T11:46:53Z</dc:date>
    <item>
      <title>Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818543#M288594</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 have a data set on which I need to do Same Store analysis..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same Store are the stores having sales last year and this year..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the sample data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Store Id&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;124&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;125&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;126&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;127&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;128&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;129&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;125&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;127&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;128&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;124&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;129&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;580&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;125&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so based on the above data set I need same store analysis as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Same Store Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Same Store Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2011&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2010&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above output is based on the stores have sales to there previous year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for 2013 -- store count =4 (123,127,125,128) and similarly sales =1500 (100+300+500+600)&lt;/P&gt;&lt;P&gt;for 2012 -- store count =2 (123,125) and sales = 1700 (800+900)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I achieve this in a straight table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Aashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818543#M288594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T11:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818544#M288595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum(aggr(count({&amp;lt; Store={"=count(Store)&amp;gt;1"}Store),Year)) --------------------&amp;gt; same store count&lt;/P&gt;&lt;P&gt;sum(aggr(sum({&amp;lt;store={"=count(Store)&amp;gt;1"}Sales),Year)) ----------------------&amp;gt;same store sales&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:37:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818544#M288595</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-11-12T11:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818545#M288596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF I may ask, Your data says in Year 2010 there is a store 123 then Y don't count up in your output table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:38:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818545#M288596</guid>
      <dc:creator>alkesh_sharma</dc:creator>
      <dc:date>2014-11-12T11:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818546#M288597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression is not working.. it gives wrong result.. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818546#M288597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T11:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818547#M288598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Alkesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that the store 123 don't have sales in year 2009...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818547#M288598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818548#M288599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;isn't it what you want is to find number of stores that have more than one trx per year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818548#M288599</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-11-12T11:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818549#M288600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this doable in QlikView ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:54:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818549#M288600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T11:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818550#M288601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Straight table with Year as dimension &lt;/P&gt;&lt;P&gt;Count Distinct&amp;nbsp; and sum for slaes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 11:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818550#M288601</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-11-12T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818551#M288602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not clear with your output table?&lt;/P&gt;&lt;P&gt;Can you explain a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How you are getting 4 stores for 2013, then where store 124?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 12:00:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818551#M288602</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2014-11-12T12:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818552#M288603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharma, check attachment, I precalculate values on script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there is typo in the 2nd 128 store for 2013, it is a typo or store 128 has 2 records in 2013?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 12:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818552#M288603</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-12T12:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818553#M288604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi KC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the count of those store which are active last year..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example in stores in 2013 are (123,124,125,126,127,128)&amp;nbsp; but out of these store only 4 were active or having sales in last year so in year 2012 (123,125,127,128) that is why in 2013 the count is 4..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope I am able to clear your doubt..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 12:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818553#M288604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T12:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818554#M288605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it was Typo.. I corrected it to 129..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't open your qvw since I am using personal edition.. could you post your solution here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 12:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818554#M288605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-12T12:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818555#M288606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, expressions are simple: sum(SameStore) and sum(SameSales)&lt;/P&gt;&lt;P&gt;This is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initial:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;Year,Store Id,Sales&lt;/P&gt;&lt;P&gt;2013,123,100&lt;/P&gt;&lt;P&gt;2013,124,200&lt;/P&gt;&lt;P&gt;2013,125,300&lt;/P&gt;&lt;P&gt;2013,126,400&lt;/P&gt;&lt;P&gt;2013,127,500&lt;/P&gt;&lt;P&gt;2013,128,600&lt;/P&gt;&lt;P&gt;2013,129,700&lt;/P&gt;&lt;P&gt;2012,123,800&lt;/P&gt;&lt;P&gt;2012,125,900&lt;/P&gt;&lt;P&gt;2012,127,1000&lt;/P&gt;&lt;P&gt;2012,128,200&lt;/P&gt;&lt;P&gt;2011,124,300&lt;/P&gt;&lt;P&gt;2011,123,500&lt;/P&gt;&lt;P&gt;2011,129,580&lt;/P&gt;&lt;P&gt;2011,125,900&lt;/P&gt;&lt;P&gt;2010,123,1000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Store Id],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Previous([Store Id])=[Store Id] and Previous(Year)=Year-1, 1) as SameStore,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Previous([Store Id])=[Store Id] and Previous(Year)=Year-1, Sales) as SameSales&lt;/P&gt;&lt;P&gt;Resident Initial&lt;/P&gt;&lt;P&gt;Order by [Store Id], Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Initial;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 12:10:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818555#M288606</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-12T12:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store analysis - Count and Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818556#M288607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;load Year&amp;amp;Store as Key,&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Store,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P&gt;from source_file;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Load (Year+1)&amp;amp;Store as Key,&lt;/P&gt;&lt;P&gt;1 as SSFlag&lt;/P&gt;&lt;P&gt;Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in the expression you can simply use this flag to count and get the sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;SSFlag={1}&amp;gt;}Store)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;SSFlag={1}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 05:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Same-Store-analysis-Count-and-Sales/m-p/818556#M288607</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-11-13T05:02:13Z</dc:date>
    </item>
  </channel>
</rss>

