<?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: Sales by previous sales regardless the current selections in Search the Community</title>
    <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777517#M22</link>
    <description>&lt;P&gt;I the PreviousSales and the growth into the script but it's only given me the value zero. But it should return a table like you showed above (the Temp table). I don't know why Previous() or Below() functions are not working.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2021 17:39:36 GMT</pubDate>
    <dc:creator>Leandro_Silva</dc:creator>
    <dc:date>2021-01-26T17:39:36Z</dc:date>
    <item>
      <title>Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1776832#M8</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that could be summarized like the one below:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;TD&gt;sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/1/2020&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9/1/2020&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8/1/2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7/1/2020&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="inherit"&gt;I want to calculate the growth percentage of sales between the current month and the previous month, &lt;U&gt;regardless the selections&lt;/U&gt;. To illustrate that the calculations are show below (under the expression &lt;U&gt;&lt;STRONG&gt;current sales/previous sales -1)&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;TD&gt;sales&lt;/TD&gt;&lt;TD&gt;previous sales&lt;/TD&gt;&lt;TD&gt;growth&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/1/2020&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0.25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9/1/2020&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8/1/2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;-0.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7/1/2020&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i do that? I've tried to use set analysis and inter-record functions but nothing worked. Someone can help me?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 20:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1776832#M8</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-22T20:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1776887#M9</link>
      <description>&lt;P&gt;You can use the below function available in Qlik&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/InterRecordFunctions/below.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/InterRecordFunctions/below.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 16:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1776887#M9</guid>
      <dc:creator>skamath1</dc:creator>
      <dc:date>2021-01-23T16:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777425#M13</link>
      <description>&lt;P&gt;Hi! I've tried to use the below() function but it's not working and i don't know why. I am using the formula: below(sales), where sales is the header of the column that i want to take the value below. This formula is returning nothing.&lt;/P&gt;&lt;P&gt;Also, the way to solving my problem is to use these inter-record functions?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 13:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777425#M13</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-26T13:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777431#M14</link>
      <description>&lt;P&gt;If you look at the help and see the examples, it mentioned that you have to use the aggregation function below.&amp;nbsp; &amp;nbsp;Use the expression below(sum(sales)) if the name of the column or field name is sales.&lt;/P&gt;&lt;P&gt;Do you want to compute in the script or in the table chart object?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 13:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777431#M14</guid>
      <dc:creator>skamath1</dc:creator>
      <dc:date>2021-01-26T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777437#M16</link>
      <description>&lt;P&gt;I want to compute that in the script. It's mandatory for me to make any changes in the data in another plataform.&lt;/P&gt;&lt;P&gt;Sales is a field and still the formula below(sum(sales)) it isn't returning anything. I also tried to use below(column(&amp;lt;number_of_the_column&amp;gt;)) as well, but without any sucess.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 14:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777437#M16</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-26T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777443#M17</link>
      <description>&lt;P&gt;Do you if it's possible to use some sort of set analysis on this? I've tried the formula below:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;date={"$(=Date(Addmonths(Max(date),-1),'YYYY-MM-DD'))"}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;to take the previous values, but it only works when i select a date value. And i would like to showcase all values regardless any selections.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 14:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777443#M17</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-26T14:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777445#M18</link>
      <description>&lt;P&gt;Assuming your fact data is at Monthly granularity.. you can easily calculate growth for each month in load Script.&lt;/P&gt;&lt;P&gt;Use below code for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Example:
Load * Inline [
date	sales	 
10/1/2020	5	
9/1/2020	4	
8/1/2020	2	
7/1/2020	4	
](delimiter is '\t');


Temp:
Load
	*,
    ( Sales / PreviousSales ) - 1  as growth;
Load
	date as Date,
	sales as Sales,
    Alt(Previous(sales),0) as PreviousSales
Resident Example
ORDER BY date ASC;

drop Table Example;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Previous.PNG" style="width: 368px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47784i73C7A3CF6731CB82/image-size/large?v=v2&amp;amp;px=999" role="button" title="Previous.PNG" alt="Previous.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use Set Identifier '1' to avoid any selection changes..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 17:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777445#M18</guid>
      <dc:creator>PradeepK</dc:creator>
      <dc:date>2021-01-26T17:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777517#M22</link>
      <description>&lt;P&gt;I the PreviousSales and the growth into the script but it's only given me the value zero. But it should return a table like you showed above (the Temp table). I don't know why Previous() or Below() functions are not working.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 17:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777517#M22</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-26T17:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sales by previous sales regardless the current selections</title>
      <link>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777717#M23</link>
      <description>&lt;P&gt;Hi PradeepK! Thanks for the help. I fixed my code and now i am using your solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Leandro&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 12:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Search-the-Community/Sales-by-previous-sales-regardless-the-current-selections/m-p/1777717#M23</guid>
      <dc:creator>Leandro_Silva</dc:creator>
      <dc:date>2021-01-27T12:57:02Z</dc:date>
    </item>
  </channel>
</rss>

