<?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 Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Same-Store-Analysis/m-p/2485458#M101272</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;I've already made a a comparison revenue sheet with 2 alternate states - Period 1 an Period 2 (year &amp;amp; months)&lt;/P&gt;
&lt;P&gt;Now there is a request to add same store filter that will filter only stores that were opened in both of the alternate states periods and where opened during the time frame, which is indicated in the following table:&lt;/P&gt;
&lt;P&gt;Branch, Open Date, Close Date&lt;/P&gt;
&lt;P&gt;Basically in order the branch will be marked as "same store" it needs to be open in that time frame that i choose as period 1 and period 2&lt;/P&gt;
&lt;P&gt;1. I've started by creating the following table which have list of all the dates per Branch between the opening and closing&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SS_Branches_tmp:&lt;BR /&gt;Load&lt;BR /&gt;INDEX_Branch,&lt;BR /&gt;date(OpenStoreDate,'DD/MM/YYYY') as SS_Branches_OpenDate,&lt;BR /&gt;if(year(date(CloseStoreDate,'DD/MM/YYYY'))=1899,date(today(),'DD/MM/YYYY'),date(CloseStoreDate,'DD/MM/YYYY')) as SS_Branches_CloseDate_tmp&lt;BR /&gt;resident Branches&lt;BR /&gt;order by INDEX_Branch DESC&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SaleDates_tmp:&lt;BR /&gt;load Distinct&lt;BR /&gt;INDEX_Branch as INDEX_Branch,&lt;BR /&gt;Date_Key as SS_Branches_Date&lt;BR /&gt;resident KeyTable;&lt;BR /&gt;left Join&lt;BR /&gt;SS_Branches:&lt;BR /&gt;load&lt;BR /&gt;INDEX_Branch,&lt;BR /&gt;date(SS_Branches_OpenDate+ IterNo()-1 ,'DD/MM/YYYY') as SS_Branches_Date,&lt;BR /&gt;'SS' as SS_Branches_Type&lt;BR /&gt;resident SS_Branches_tmp&lt;BR /&gt;while SS_Branches_OpenDate+ IterNo()-1 &amp;lt;= SS_Branches_CloseDate_tmp;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SaleDates:&lt;BR /&gt;load&lt;BR /&gt;INDEX_Branch&amp;amp;'|'&amp;amp;SS_Branches_Date as INDEX_SSDates,&lt;BR /&gt;INDEX_Branch as SS_Branches_Branch,&lt;BR /&gt;SS_Branches_Date,&lt;BR /&gt;if(len(SS_Branches_Type)&amp;gt;0,'SS','NOT SS') as SS_Branches_Type,&lt;BR /&gt;if(len(SS_Branches_Type)&amp;gt;0,1,0) as SS_Branches_TypeNum&lt;BR /&gt;resident SaleDates_tmp;&lt;/P&gt;
&lt;P&gt;drop table SaleDates_tmp;&lt;BR /&gt;Drop Table SS_Branches_tmp;&lt;/P&gt;
&lt;P&gt;2. Then i've created the following filter in the UI - basicaly its counting the working days in each selected period (Period 2) and counting for each branch it's SS (Same store) days the days between it's opening and closing&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if the working dates are greater than the SS its not Same store&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;aggr(&lt;BR /&gt;if(&lt;BR /&gt;COUNT( TOTAL {1&amp;lt;Year=Period2::Year,Month=Period2::Month,Week=Period2::Week,Date=Period2::Date,INDEX_Branch=&amp;gt;} Date)&lt;BR /&gt;&amp;gt;&lt;BR /&gt;AGGR(COUNT(DISTINCT {&amp;lt;Year=Period2::Year,Month=Period2::Month,Week=Period2::Week,Date=Period2::Date,SS_Branches_Type={'SS'}&amp;gt;} SS_Branches_Date),Branch)&lt;BR /&gt;,'Not SS','SS'),Branch)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;now, the problem is that it's now filtering all the data in the sheet - only if i put it into pivot table and use the above filter as a dimension with "not to include null value"&lt;/P&gt;
&lt;P&gt;please help me to implement it so it will filter properly&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Lev&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Oct 2024 13:50:53 GMT</pubDate>
    <dc:creator>fishmanl</dc:creator>
    <dc:date>2024-10-05T13:50:53Z</dc:date>
    <item>
      <title>Same Store Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Same-Store-Analysis/m-p/2485458#M101272</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;I've already made a a comparison revenue sheet with 2 alternate states - Period 1 an Period 2 (year &amp;amp; months)&lt;/P&gt;
&lt;P&gt;Now there is a request to add same store filter that will filter only stores that were opened in both of the alternate states periods and where opened during the time frame, which is indicated in the following table:&lt;/P&gt;
&lt;P&gt;Branch, Open Date, Close Date&lt;/P&gt;
&lt;P&gt;Basically in order the branch will be marked as "same store" it needs to be open in that time frame that i choose as period 1 and period 2&lt;/P&gt;
&lt;P&gt;1. I've started by creating the following table which have list of all the dates per Branch between the opening and closing&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SS_Branches_tmp:&lt;BR /&gt;Load&lt;BR /&gt;INDEX_Branch,&lt;BR /&gt;date(OpenStoreDate,'DD/MM/YYYY') as SS_Branches_OpenDate,&lt;BR /&gt;if(year(date(CloseStoreDate,'DD/MM/YYYY'))=1899,date(today(),'DD/MM/YYYY'),date(CloseStoreDate,'DD/MM/YYYY')) as SS_Branches_CloseDate_tmp&lt;BR /&gt;resident Branches&lt;BR /&gt;order by INDEX_Branch DESC&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SaleDates_tmp:&lt;BR /&gt;load Distinct&lt;BR /&gt;INDEX_Branch as INDEX_Branch,&lt;BR /&gt;Date_Key as SS_Branches_Date&lt;BR /&gt;resident KeyTable;&lt;BR /&gt;left Join&lt;BR /&gt;SS_Branches:&lt;BR /&gt;load&lt;BR /&gt;INDEX_Branch,&lt;BR /&gt;date(SS_Branches_OpenDate+ IterNo()-1 ,'DD/MM/YYYY') as SS_Branches_Date,&lt;BR /&gt;'SS' as SS_Branches_Type&lt;BR /&gt;resident SS_Branches_tmp&lt;BR /&gt;while SS_Branches_OpenDate+ IterNo()-1 &amp;lt;= SS_Branches_CloseDate_tmp;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;SaleDates:&lt;BR /&gt;load&lt;BR /&gt;INDEX_Branch&amp;amp;'|'&amp;amp;SS_Branches_Date as INDEX_SSDates,&lt;BR /&gt;INDEX_Branch as SS_Branches_Branch,&lt;BR /&gt;SS_Branches_Date,&lt;BR /&gt;if(len(SS_Branches_Type)&amp;gt;0,'SS','NOT SS') as SS_Branches_Type,&lt;BR /&gt;if(len(SS_Branches_Type)&amp;gt;0,1,0) as SS_Branches_TypeNum&lt;BR /&gt;resident SaleDates_tmp;&lt;/P&gt;
&lt;P&gt;drop table SaleDates_tmp;&lt;BR /&gt;Drop Table SS_Branches_tmp;&lt;/P&gt;
&lt;P&gt;2. Then i've created the following filter in the UI - basicaly its counting the working days in each selected period (Period 2) and counting for each branch it's SS (Same store) days the days between it's opening and closing&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if the working dates are greater than the SS its not Same store&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;aggr(&lt;BR /&gt;if(&lt;BR /&gt;COUNT( TOTAL {1&amp;lt;Year=Period2::Year,Month=Period2::Month,Week=Period2::Week,Date=Period2::Date,INDEX_Branch=&amp;gt;} Date)&lt;BR /&gt;&amp;gt;&lt;BR /&gt;AGGR(COUNT(DISTINCT {&amp;lt;Year=Period2::Year,Month=Period2::Month,Week=Period2::Week,Date=Period2::Date,SS_Branches_Type={'SS'}&amp;gt;} SS_Branches_Date),Branch)&lt;BR /&gt;,'Not SS','SS'),Branch)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;now, the problem is that it's now filtering all the data in the sheet - only if i put it into pivot table and use the above filter as a dimension with "not to include null value"&lt;/P&gt;
&lt;P&gt;please help me to implement it so it will filter properly&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Lev&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Oct 2024 13:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Same-Store-Analysis/m-p/2485458#M101272</guid>
      <dc:creator>fishmanl</dc:creator>
      <dc:date>2024-10-05T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Same Store Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Same-Store-Analysis/m-p/2485584#M101288</link>
      <description>&lt;P&gt;sample data, current result and needed result please?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 11:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Same-Store-Analysis/m-p/2485584#M101288</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-10-07T11:30:26Z</dc:date>
    </item>
  </channel>
</rss>

