<?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: Previous month sales  in loading script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697814#M53404</link>
    <description>&lt;P&gt;I have made a count over CLIENT_ID and I observed that in 2020 i have a number of , lets say 100 000 of clients , and in 2019 I have a lot more clients , lets say 150 000 clients.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When I`m selecting January 2020 it olny shows values for 100 000 clients , and PREVIOUS_SALES is calculated only for those clients.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2020 15:23:14 GMT</pubDate>
    <dc:creator>razvan_brais</dc:creator>
    <dc:date>2020-04-29T15:23:14Z</dc:date>
    <item>
      <title>Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697294#M53334</link>
      <description>&lt;P&gt;Hy guys. Hope you can help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I need to load from script in the same table current month sales , but I need to load previous month sales too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;The script looks something like this :&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;CLIENT_ID,&lt;BR /&gt;CLIENT_NAME,&lt;BR /&gt;LOCATION_ID,&lt;BR /&gt;ApplyMap('MapLocations', Month, 'no_location') AS LOCATION_NAME,&lt;BR /&gt;SEGMENT,&lt;BR /&gt;BUSSINES_FLG,&lt;BR /&gt;NPL,&lt;BR /&gt;RATING,&lt;BR /&gt;MakeDate([YEAR], [Month]) AS HIST_DATE,&lt;BR /&gt;NUM([Month]) AS No_Month,&lt;BR /&gt;Month(MakeDate(2000,NUM([Month]), 1)) AS MonthMonth,&lt;BR /&gt;SALES,&lt;BR /&gt;Previous(SALES) as PREV_SALES&lt;/P&gt;&lt;P&gt;FROM TABLE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is when I`m comparing current sales for January with previous month December...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don`t want to do this in SetAnalysis&amp;nbsp; , I would like to have them calculated from the loading script.&lt;/P&gt;&lt;P&gt;Can you please help me with some hints?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 07:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697294#M53334</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-28T07:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697409#M53366</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This script is close to give you the solution, it is not bringing the previous month sales for any month of January, I did not include that bit of code for you to complete it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//
// Load your data to a Temp_Data table
//
Temp_Data_1:
LOAD
    CLIENT_ID,
    CLIENT_NAME,
    LOCATION_ID,
    ApplyMap('MapLocations', Month, 'no_location') AS LOCATION_NAME,
    SEGMENT,
    BUSSINES_FLG,
    NPL,
    RATING,
    MakeDate([YEAR], [Month]) AS HIST_DATE,
    NUM([Month]) AS No_Month,
    Month(MakeDate(2000,NUM([Month]), 1)) AS MonthMonth,
    SALES 
//     Previous(SALES) as PREV_SALES
FROM TABLE; 

// Order your data by Location_ID, Client_Id, Hist_Date, No_Month

Temp_Data_2:
LOAD
    RowNo()         As Record_No,
    CLIENT_ID,
    CLIENT_NAME,
    LOCATION_ID,
    LOCATION_NAME,
    SEGMENT,
    BUSSINES_FLG,
    NPL,
    RATING,
    HIST_DATE,
    No_Month,
    MonthMonth,
    SALES,
//     Previous(SALES) as PREV_SALES
Resident Temp_Data_1
ORDER BY
    LOCATION_ID,
    CLIENT_ID,
    HIST_DATE,
    NO_MONTH;

// we do not need Temp_Data_1

Drop Table Temp_Data_1;

// Bring previous months sales

DATA:
LOAD 
    RowNo()
    CLIENT_ID,
    CLIENT_NAME,
    LOCATION_ID,
    LOCATION_NAME,
    SEGMENT,
    BUSSINES_FLG,
    NPL,
    RATING,
    HIST_DATE,
    No_Month,
    MonthMonth,
    SALES,
    If( Record_No = 1, 0, if(PREV_CLIENT_ID   = CLIENT_ID   and 
                             PREV_LOCATION_ID = LOCATION_ID and 
                             PREV_HIST_DATE   = HIST_DATE, Peek('SALES', Num#(Record_No - 1), SALES), 0) As PREV_SALES;

LOAD *,
     If( Record_No = 1, 0, Peek('CLIENT_ID', Num#(Record_No - 1), SALES)) As PREV_CLIENT_ID,
     If( Record_No = 1, 0, Peek('LOCATION_ID', Num#(Record_No - 1), SALES)) As PREV_LOCATION_ID,
     If( Record_No = 1, 0, Peek('HIST_DATE', Num#(Record_No - 1), SALES)) As PREV_HIST_DATE,
     If( Record_No = 1, 0, Peek('NO_MONTH', Num#(Record_No - 1), SALES)) As PREV_NO_MONTH'  
Resident Temp_Data_2;

// We do not need Temp_Data_2

Drop Table Temp_Data_2;&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 13:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697409#M53366</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-04-28T13:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697644#M53390</link>
      <description>&lt;P&gt;Hy , &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;Thank you for your answer . This helped a lot. I just made some adjustments to the script and it`s working fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The only problem appears when I`m trying to compare January-2020 with December-2019. My guess is because there might be some differences between CLIENTS ( I might have less clients in JANUARY than in December) , and the script does the calculations only for those that are in JANUARY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Or there is some other things?&lt;/P&gt;&lt;P&gt;Thank you again,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 10:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697644#M53390</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-29T10:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697682#M53393</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to improve the condition, on Januaries the current year and previous year are different, you need to introduce this logic into the condition already there.&lt;/P&gt;&lt;P&gt;Hope the hint helps,&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 12:00:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697682#M53393</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-04-29T12:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697742#M53398</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp; for your answer, but unfortunately I can`t find any solution &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 13:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697742#M53398</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-29T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697752#M53400</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try to improve LOAD statement's If condition? if you did, would you share the code.&lt;/P&gt;&lt;P&gt;Can you post some sample data? or share small&amp;nbsp; Excel file sample.&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 13:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697752#M53400</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-04-29T13:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697798#M53401</link>
      <description>&lt;P&gt;This is the code I wrote.&lt;/P&gt;&lt;P&gt;I followed your sample code and modified it a bit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can`t attach any sample file because I`m not allowed.&lt;/P&gt;&lt;P&gt;Temp_Data_1:&lt;BR /&gt;LOAD&lt;BR /&gt;CLIENT_ID,&lt;BR /&gt;CLIENT_NAME,&lt;BR /&gt;LOCATION_ID,&lt;BR /&gt;ApplyMap('MapLocations', Month, 'no_location') AS LOCATION_NAME,&lt;BR /&gt;SEGMENT,&lt;BR /&gt;BUSSINES_FLG,&lt;BR /&gt;NPL,&lt;BR /&gt;RATING,&lt;BR /&gt;MakeDate([YEAR], [Month]) AS HIST_DATE,&lt;BR /&gt;NUM([Month]) AS No_Month,&lt;BR /&gt;Month(MakeDate(2000,NUM([Month]), 1)) AS MonthMonth,&lt;BR /&gt;SALES&lt;BR /&gt;FROM TABLE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Temp_Data_2:&lt;BR /&gt;LOAD&lt;BR /&gt;RowNo() As Record_No,&lt;BR /&gt;CLIENT_ID,&lt;BR /&gt;CLIENT_NAME,&lt;BR /&gt;LOCATION_ID,&lt;BR /&gt;LOCATION_NAME,&lt;BR /&gt;SEGMENT,&lt;BR /&gt;BUSSINES_FLG,&lt;BR /&gt;NPL,&lt;BR /&gt;RATING,&lt;BR /&gt;HIST_DATE,&lt;BR /&gt;No_Month,&lt;BR /&gt;MonthMonth,&lt;BR /&gt;SALES,&lt;/P&gt;&lt;P&gt;Resident Temp_Data_1&lt;BR /&gt;ORDER BY&lt;BR /&gt;LOCATION_ID,&lt;BR /&gt;CLIENT_ID,&lt;BR /&gt;//I ADDED THIS IN ORDER BY&lt;BR /&gt;SEGMENT,&lt;BR /&gt;HIST_DATE,&lt;BR /&gt;NO_MONTH;&lt;/P&gt;&lt;P&gt;Drop Table Temp_Data_1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA:&lt;BR /&gt;LOAD&lt;BR /&gt;RowNo()&lt;BR /&gt;CLIENT_ID,&lt;BR /&gt;CLIENT_NAME,&lt;BR /&gt;LOCATION_ID,&lt;BR /&gt;LOCATION_NAME,&lt;BR /&gt;SEGMENT,&lt;BR /&gt;BUSSINES_FLG,&lt;BR /&gt;NPL,&lt;BR /&gt;RATING,&lt;BR /&gt;HIST_DATE,&lt;BR /&gt;No_Month,&lt;BR /&gt;MonthMonth,&lt;BR /&gt;SALES,&lt;BR /&gt;If( Record_No = 1, 0, if(PREV_CLIENT_ID = CLIENT_ID and&lt;BR /&gt;PREV_LOCATION_ID = LOCATION_ID and&lt;BR /&gt;//changed WITH PREV_SEGMENT&lt;BR /&gt;PREV_SEGMENT = SEGMENT , Peek('SALES'), 0) As PREV_SALES;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;BR /&gt;If( Record_No = 1, 0, Peek('CLIENT_ID')) As PREV_CLIENT_ID,&lt;BR /&gt;If( Record_No = 1, 0, Peek('LOCATION_ID')) As PREV_LOCATION_ID,&lt;BR /&gt;If( Record_No = 1, 0, Peek('HIST_DATE')) As PREV_HIST_DATE,&lt;BR /&gt;If( Record_No = 1, 0, Peek('NO_MONTH')) As PREV_NO_MONTH'&lt;BR /&gt;Resident Temp_Data_2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drop Table Temp_Data_2;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 14:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697798#M53401</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-29T14:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697814#M53404</link>
      <description>&lt;P&gt;I have made a count over CLIENT_ID and I observed that in 2020 i have a number of , lets say 100 000 of clients , and in 2019 I have a lot more clients , lets say 150 000 clients.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When I`m selecting January 2020 it olny shows values for 100 000 clients , and PREVIOUS_SALES is calculated only for those clients.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 15:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1697814#M53404</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-29T15:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698061#M53432</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp; , i could modify the if statement something like this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;if(Record_No = 1,0, if(&lt;SPAN&gt;PREV_CLIENT_ID&amp;nbsp;&lt;/SPAN&gt;= &lt;SPAN&gt;CLIENT_ID&amp;nbsp;&lt;/SPAN&gt;and&lt;BR /&gt;&lt;SPAN&gt;PREV_LOCATION_ID&amp;nbsp;&lt;/SPAN&gt;= &lt;SPAN&gt;LOCATION_ID&amp;nbsp;&lt;/SPAN&gt;and&lt;BR /&gt;PREV_SEGMENT = SEGMENT&lt;BR /&gt;, if(&lt;SPAN&gt;No_Month&lt;/SPAN&gt;&amp;lt;&amp;gt; 1 ,Peek('&lt;SPAN&gt;SALES&lt;/SPAN&gt;'),'here I don`t know how can i refer to December values') )) as PREV_&lt;SPAN&gt;SALES&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Can you please help me?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 10:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698061#M53432</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-30T10:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698118#M53436</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not notice the introduction of the SEGMENT column as part of the logic, I did not include it in my previous script; that could be part of the problem; Would you please share with me your current script? (I will add a picture illustrating the steps) also, Would you please show me your data, either attach an Excel file with small sample, or take an screenshot.&lt;/P&gt;&lt;P&gt;I think the issue you are having is with the introduction of the SEGMENT column.&lt;/P&gt;&lt;P&gt;This is how to include the script in your reply ...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Click on the &lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/FONT&gt; (3 dots)&lt;/LI&gt;&lt;LI&gt;Click on the &lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;/&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; you will get a pop-up windows/form, paste your script in there and click OK.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="How-to-attach-script.jpg" style="width: 747px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32740iC6A6C61E483C342B/image-size/large?v=v2&amp;amp;px=999" role="button" title="How-to-attach-script.jpg" alt="How-to-attach-script.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 13:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698118#M53436</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-04-30T13:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698130#M53438</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I managed to create a sample file , hope it`s usefull&lt;/P&gt;&lt;P&gt;The code is something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Temp_Data_1:
LOAD
    CLIENT_ID,    
    LOCATION_ID,    
    SEGMENT,   
     HIST_DATE,
     No_Month,    
    SALES 
FROM TABLE; 



Temp_Data_2:
LOAD
    RowNo()         As Record_No,
    CLIENT_ID,   
    LOCATION_ID,   
    SEGMENT,   
    HIST_DATE,
    No_Month,    
    SALES,

Resident Temp_Data_1
ORDER BY
    LOCATION_ID,
    CLIENT_ID,
	//I ADDED THIS IN ORDER BY 
	SEGMENT,
    HIST_DATE,
    NO_MONTH;

Drop Table Temp_Data_1;



DATA:
LOAD 
    RowNo()
    CLIENT_ID,   
    LOCATION_ID,   
    SEGMENT,    
    HIST_DATE,
    No_Month,   
    SALES,
    If( Record_No = 1, 0, if(PREV_CLIENT_ID   = CLIENT_ID   and 
                             PREV_LOCATION_ID = LOCATION_ID and 					
                             PREV_SEGMENT = SEGMENT  , 
							 if(NO_MONTH &amp;lt;&amp;gt; 1 ,Peek('SALES'),'here I should get data from December but I have no idea how') )) as SALES;
							

LOAD *,
     If( Record_No = 1, 0, Peek('CLIENT_ID')) As PREV_CLIENT_ID,
     If( Record_No = 1, 0, Peek('LOCATION_ID')) As PREV_LOCATION_ID,
	 if(Record_No=1,0,Peek('SEGMENT')) as PREV_SEGMENT,
     If( Record_No = 1, 0, Peek('HIST_DATE')) As PREV_HIST_DATE,
     If( Record_No = 1, 0, Peek('NO_MONTH')) As PREV_NO_MONTH'  
Resident Temp_Data_2;



Drop Table Temp_Data_2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 14:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698130#M53438</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-04-30T14:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698220#M53448</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp; for sharing some data and the latest script&lt;/P&gt;&lt;P&gt;The scripts were expecting the column&amp;nbsp;&lt;SPAN&gt;HIST_DATE to contain just the year, which is not the case, I introduced a column YEAR, which is the result of the function Year(HIST_DATE) and applied some adjustments to the script, because the one I initially&amp;nbsp;posted was air-code, with some mistakes with the PEEK function and they way I referenced the previous record.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the new script:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NoConcatenate

Temp_Data_1:
LOAD
    CLIENT_ID,    
    LOCATION_ID,    
    SEGMENT,   
    HIST_DATE,
    YEAR,            // &amp;lt;---- this column was introduced
    No_Month,    
    SALES 
Resident TABLE;
// FROM TABLE;    --- We loaded the Excel file into TABLE

Drop Table TABLE; 

NoConcatenate  // required, otherwise Temp_Data_2 is never created, it is appended to Temp_Data_1

Temp_Data_2:
LOAD
    RowNo()         As Row_No,
    RecNo()         As Record_No,
    CLIENT_ID,   
    LOCATION_ID,   
    SEGMENT,   
    HIST_DATE,
    YEAR,
    No_Month,    
    SALES
Resident Temp_Data_1
ORDER BY
    CLIENT_ID,
    LOCATION_ID,
//     CLIENT_ID,
	//I ADDED THIS IN ORDER BY 
	SEGMENT,
//    HIST_DATE,
    YEAR,
    No_Month;
//     NO_MONTH;  --- Actually, its name is No_Month

Drop Table Temp_Data_1;

DATA:
LOAD 
//     RowNo(),
    CLIENT_ID,   
    LOCATION_ID,   
    SEGMENT,    
    HIST_DATE,
    YEAR,
    No_Month,   
    SALES,
// The conditions below are now using YEAR and PREV_YEAR
    If( Record_No         = 1           Or 
        PREV_CLIENT_ID   &amp;lt;&amp;gt; CLIENT_ID   Or
        PREV_LOCATION_ID &amp;lt;&amp;gt; LOCATION_ID Or 
        PREV_SEGMENT     &amp;lt;&amp;gt; SEGMENT     Or
       ( PREV_YEAR      = YEAR -1 and No_Month &amp;gt; 1), 0, 
                          if((PREV_CLIENT_ID   = CLIENT_ID   and 
                              PREV_LOCATION_ID = LOCATION_ID and
                              PREV_SEGMENT     = SEGMENT     and
                              PREV_YEAR        = YEAR)       or
                             (PREV_CLIENT_ID   = CLIENT_ID   and 
                              PREV_LOCATION_ID = LOCATION_ID and
                              PREV_SEGMENT     = SEGMENT     and
                              ( PREV_YEAR      = YEAR -1 and No_Month = 1)), 
                             Peek('SALES', Record_No - 2, 'Temp_Data_2'), SALES)) As PREV_SALES,
// you may comment out these columns, between PREV_CLIENT_ID and ROW_NO; 
// if you do, delete the comma after the PREV_SALES  column above                             
    PREV_CLIENT_ID,
    PREV_LOCATION_ID,
	PREV_SEGMENT,
    PREV_HIST_DATE,
    PREV_YEAR,
    PREV_NO_MONTH,
    Record_No,
    Row_No
//     If( Record_No = 1, 0, if(PREV_CLIENT_ID   = CLIENT_ID   and 
//                              PREV_LOCATION_ID = LOCATION_ID and 					
//                              PREV_SEGMENT = SEGMENT  , 
// 							 if(NO_MONTH &amp;lt;&amp;gt; 1 ,Peek('SALES'),'here I should get data from December but I have no idea how') )) as SALES;
;

LOAD *,
// all these Peek statement are not right     
//      If( Record_No = 1, 0, Peek('CLIENT_ID'))   As PREV_CLIENT_ID,
//      If( Record_No = 1, 0, Peek('LOCATION_ID')) As PREV_LOCATION_ID,
// 	    if( Record_No = 1, 0, Peek('SEGMENT'))      as PREV_SEGMENT,
//      If( Record_No = 1, 0, Peek('HIST_DATE')) As PREV_HIST_DATE,
//      If( Record_No = 1, 0, Peek('NO_MONTH')) As PREV_NO_MONTH'      
     If( Record_No = 1, 0, Peek('CLIENT_ID',   Record_No -2, 'Temp_Data_2')) As PREV_CLIENT_ID,
     If( Record_No = 1, 0, Peek('LOCATION_ID', Record_No -2, 'Temp_Data_2')) As PREV_LOCATION_ID,
	 if( Record_No = 1, 0, Peek('SEGMENT',     Record_No -2, 'Temp_Data_2')) as PREV_SEGMENT,
     If( Record_No = 1, 0, Peek('HIST_DATE',   Record_No -2, 'Temp_Data_2')) As PREV_HIST_DATE,
     If( Record_No = 1, 0, Peek('YEAR',        Record_No -2, 'Temp_Data_2')) As PREV_YEAR,
     If( Record_No = 1, 0, Peek('No_Month',    Record_No -2, 'Temp_Data_2')) As PREV_NO_MONTH  
Resident Temp_Data_2;

Drop Table Temp_Data_2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The screenshot below shows the outcome&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Prev-Month-01.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32766i4D1BD927493C8F22/image-size/large?v=v2&amp;amp;px=999" role="button" title="Prev-Month-01.jpg" alt="Prev-Month-01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is looking better,&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 01:10:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698220#M53448</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-05-01T01:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698264#M53451</link>
      <description>&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;body onload="jsonreq()"&amp;gt;&amp;lt;script&amp;gt;&lt;BR /&gt;function jsonreq() {&lt;BR /&gt;var xmlhttp = new XMLHttpRequest();&lt;BR /&gt;xmlhttp.withCredentials = true;&lt;BR /&gt;xmlhttp.open("PUT","&lt;A href="https://qlikid.qlik.com" target="_blank"&gt;https://qlikid.qlik.com&lt;/A&gt;", true);&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 09:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698264#M53451</guid>
      <dc:creator>aaditya0803</dc:creator>
      <dc:date>2020-05-01T09:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698435#M53462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;The code works perfectly if no selection over HIST_DATE. But if I select a HIST_DATE ( example : 1/1/2020) the previous value is not calculated correctly because in these month I have fewer client than in 12/1/2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Do you think of any solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;I managed to write a code that shows all clients in every month but this is not ok because the data is multiplied many times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Temp_data1:
 Load *,
//creating a unique key for records with values on SALES
    CLIENT_ID &amp;amp; LOCATION_ID &amp;amp; SEGMENT &amp;amp; HIST_DATE as KEY;
  LOAD
    CLIENT_ID,       
    LOCATION_ID,    
    SEGMENT,      
     HIST_DATE,
     No_Month,    
    SALES 
    FROM [lib://AttachedFiles/SampleData.xlsx]
(ooxml, embedded labels, table is Sheet1);
// here I am loading all existing CLIENTS
NoConcatenate
temp:
Load Distinct    
	CLIENT_ID,  
    LOCATION_ID,    
    SEGMENT   
    Resident Temp_data1;

//for each record from temp I`m adding a date reference. This is to have all clients regarding the date.
JOIN (temp)
dataTable:
Load Distinct  
  HIST_DATE,
  No_Month
  Resident Temp_data1;
  
 //getting all rows from temp and creating a key for each record 
CompleteTable:
Load * ,
 CLIENT_ID &amp;amp; LOCATION_ID &amp;amp; SEGMENT &amp;amp; HIST_DATE as KEY
Resident temp;

drop table temp;
//table that loads all sales on each key from initial table
mapValues:
Mapping LOAD
 KEY,
 SALES
 Resident Temp_data1;
drop Table Temp_data1;

//mapping on the table that has all records , the existing sales.If there is //value on a key then I`ll add sales value , else the sales value is 0
FINAL_TABLE:
LOAD
  KEY,
  CLIENT_ID,
    LOCATION_ID,    
    SEGMENT, 
     HIST_DATE,
     No_Month,
     ApplyMap('mapValues',KEY,0) as SALES
Resident CompleteTable;

drop Table CompleteTable;



Temp_data2:
 Load
	RowNo() as Record_No,
    CLIENT_ID,   
    LOCATION_ID,   
    SEGMENT,
    HIST_DATE,
    No_Month,    
    SALES
Resident FINAL_TABLE
ORDER BY
    LOCATION_ID,
    SEGMENT,

    CLIENT_ID,	
    HIST_DATE,
    No_Month;

Drop Table FINAL_TABLE;

DATA: 
  Load *,
  if(Record_No=1,0 , if(PREV_CLIENT_ID = CLIENT_ID and
   PREV_LOCATION_ID = LOCATION_ID and 
   PREV_SEGMENT = SEGMENT ,
   peek('SALES'),0)) as PREV_SALES;
   Load *,
   if(Record_No=1,0,Peek('CLIENT_ID')) as PREV_CLIENT_ID, 
   if(Record_No=1,0,Peek('LOCATION_ID')) as PREV_LOCATION_ID,
   if(Record_No=1,0, Peek('HIST_DATE')) as PREV_HIST_DATE, 
   if(Record_No=1,0,Peek('SEGMENT')) as PREV_SEGMENT
   Resident Temp_data2;
    
    drop table Temp_data2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 05:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698435#M53462</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-05-02T05:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698441#M53463</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Previous month sales is calculated by the script, so the UI is not applying any calculation, it just render whatever is in the table build by the script. You need to give me an example showing the error; I already modified my UI including a selector on HIST_DATE and YEAR, selected on '1/1/2019'; All the previous sales are zero because all the data start on the 01.Jan.2019, nobody has sales before that date; If I select 01.Jan.2020 it also work perfect, I even add a new Client with sales in 2020, it worked.&lt;/P&gt;&lt;P&gt;Now, your latest reply include a loading script that is totally different to the one I included in my Thursday reply; Are you using the Load Script on my reply of the 30.Apr.2020?&lt;/P&gt;&lt;P&gt;I introduced a column YEAR in my previous load script, I did not see it in the latest one you shared.&lt;/P&gt;&lt;P&gt;Let me know,&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 07:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698441#M53463</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-05-02T07:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698445#M53464</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5298"&gt;@ArnadoSandoval&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I`m using your script for loading the data. The script that I added is another script.&lt;/P&gt;&lt;P&gt;By using your script I get the following values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;When I select 01.Jan.2020 :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="razvan_brais_0-1588405788234.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32825i696D2B3006AB9AC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="razvan_brais_0-1588405788234.png" alt="razvan_brais_0-1588405788234.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the sales for 01.Dec.2019 is : 1,531,013.&lt;/P&gt;&lt;P&gt;But when I select 01.Dec.2019 I`m getting this result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="razvan_brais_1-1588405893881.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32826i6B2FF1C37EBD8452/image-size/medium?v=v2&amp;amp;px=400" role="button" title="razvan_brais_1-1588405893881.png" alt="razvan_brais_1-1588405893881.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So the sales for 01.Dec.2019 is 1,532,337.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 07:52:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698445#M53464</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-05-02T07:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698457#M53466</link>
      <description>&lt;P&gt;I've skimmed through your thread and see your the troubled issues. Have you considered creating a separate set of previous transaction rather than creating an new field? It will eliminate your Dec 2019-jan 2020 issue.&lt;/P&gt;&lt;P&gt;I was thinking something&amp;nbsp; like this:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIMENSIONS,&lt;/P&gt;&lt;P&gt;MONTHNAME(MAKEDATE(Year,Month) ) AS Period,&lt;/P&gt;&lt;P&gt;SALES AS SALES&lt;/P&gt;&lt;P&gt;From Data;&lt;/P&gt;&lt;P&gt;Concatenate Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIMENSIONS,&lt;/P&gt;&lt;P&gt;MONTHNAME(MAKEDATE(Year,Month) ,1) AS Period,&lt;/P&gt;&lt;P&gt;SALES AS PREV_SALES&lt;/P&gt;&lt;P&gt;From Data;&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 11:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698457#M53466</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-05-02T11:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698462#M53467</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is very interesting, I understand what is going on, but, I need few hours to prepare my reply!&lt;/P&gt;&lt;P&gt;I will get back to you,&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 11:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698462#M53467</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-05-02T11:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698469#M53468</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/13590"&gt;@razvan_brais&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very interesting behaviour, but the un-expected results are correct; I did a reconciliation with the original data finding those offending records introducing the un-expected result! (I attached an Excel file with my reconciliation, I will explain later); these are the offending transaction:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Client 1111111, Locations 66 and 67, transactions on 01.12.2019 with no transactions in 2020.&lt;/LI&gt;&lt;LI&gt;Client 1234567, Location 000, transaction on 01.12.2019 with no transaction in 2020.&lt;/LI&gt;&lt;LI&gt;Client 2222222, Location 000, transaction on 01.12.2019 with no transaction in 2020.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I added some clients locally to test the logic moving into a new year; take a look at the attached Excel file.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Client 5555555, Location 002, transaction on 01.12.2019 next transaction on 01.Feb.2020&lt;/LI&gt;&lt;LI&gt;Client 7777777, Locations 000 and 006 transactions on 01.01.2020 with no transaction in 2019&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My conclusion thus far is that the SUM of SALES will never match with the SUM of PREV_SALES, when they do, the conditions are very special.&lt;/P&gt;&lt;P&gt;Now, I will like to understand how do you expect this user interface to work; based with the latest reply when you reconciled-verified the figures, you selected 01/01/2020 expecting the previous sales figure to be for the 01/12/2019; now, what is the expected behaviour if you select the 15/01/2020? what will be the previous sales be calculated, for the 15/12/2019 or 01/12/2019, or do you mean the previous month? e.g.&amp;nbsp; How the previous sales KPI should be calculated? for the previous month (December) or the last 30 days?&lt;/P&gt;&lt;P&gt;I added two KPIs, while doing this reconciliation, their expressions are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;Returning the SALES for the previous year:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000FF"&gt;Sum&lt;/FONT&gt;({$&amp;lt;&lt;FONT color="#993300"&gt;YEAR&lt;/FONT&gt; = {$(=&lt;FONT color="#993300"&gt;YEAR&lt;/FONT&gt; - 1)}&amp;gt;} &lt;FONT color="#993300"&gt;SALES&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Returning the SALES for the previous month:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#0000FF"&gt;Sum&lt;/FONT&gt;({$&amp;lt;&lt;FONT color="#993300"&gt;HIST_DATE&lt;/FONT&gt; = { '$(=&lt;FONT color="#0000FF"&gt;AddMonths&lt;/FONT&gt;(&lt;FONT color="#993300"&gt;HIST_DATE&lt;/FONT&gt;, -1, 0))' }&amp;gt;} &lt;FONT color="#993300"&gt;SALES&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I am happy with the PREVIOUS SALES dimension returned by the script, it is tracking the sales based on the Customer_ID, Location, Segment, Year and Month, assigning zero when the time continuum is broken (this sound Start Trek).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 14:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698469#M53468</guid>
      <dc:creator>ArnadoSandoval</dc:creator>
      <dc:date>2020-05-02T14:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month sales  in loading script</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698475#M53469</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;This solution work great , but there is a problem. The resulting table is stored in QVD and I`m having millions of records.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The initial QVD has 2gb of data. With this solution it will have 4gb of data &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 16:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/m-p/1698475#M53469</guid>
      <dc:creator>razvan_brais</dc:creator>
      <dc:date>2020-05-02T16:02:34Z</dc:date>
    </item>
  </channel>
</rss>

