<?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: Compare last year Sales in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775841#M60133</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;no need to complicate,&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;FECHA as Date,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P&gt;from load file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table&lt;/P&gt;&lt;P&gt;DIM = Year(FECHA)&lt;/P&gt;&lt;P&gt;Measure=Sum(Sales)&lt;/P&gt;&lt;P&gt;table as blow&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksrinivasan_0-1611116142631.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47429iB5954E5D7BB7A805/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksrinivasan_0-1611116142631.png" alt="Ksrinivasan_0-1611116142631.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ksrinivasan&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 04:16:58 GMT</pubDate>
    <dc:creator>Ksrinivasan</dc:creator>
    <dc:date>2021-01-20T04:16:58Z</dc:date>
    <item>
      <title>Compare last year Sales</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775809#M60131</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I would like to compare the current sales with previous year. I understand I have problems because I would like to match the current specific date with date of the previous year.&lt;/P&gt;&lt;P&gt;In my script, I create a calendar with two fields, the current date and the date with previous year. After I do left join with the table with current sales and currrent date, after I do left join with the previous sales and previous date.&lt;/P&gt;&lt;P&gt;I think the left joins aren't fine but I don't know how I can do it.&lt;/P&gt;&lt;P&gt;I show you the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PRIMAS_ACTUALES:&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(FECHA) AS FECHA,&lt;BR /&gt;Date(AddMonths(FECHA,-12)) AS FECHA_PREV,&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Load Date(MinDate + IterNo() -1 ) AS FECHA While (MinDate + IterNo() - 1) &amp;lt;= Num(MaxDate);&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Min(FECHA) AS MinDate,&lt;/P&gt;&lt;P&gt;Max(FECHA) AS MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT ORIGEN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;NUMERO_CONTRAT,&lt;BR /&gt;FECHA,&lt;BR /&gt;sum(SALES) as SALES_CURRENT&lt;/P&gt;&lt;P&gt;Resident ORIGEN&lt;BR /&gt;group by&lt;BR /&gt;NUMERO_CONTRAT,&lt;BR /&gt;FECHA;&lt;BR /&gt;&lt;BR /&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;NUMERO_CONTRAT,&lt;BR /&gt;FECHA AS FECHA_PREV,&lt;BR /&gt;sum(SALES) as SALES_PREV&lt;/P&gt;&lt;P&gt;Resident ORIGEN&lt;BR /&gt;group by&lt;BR /&gt;NUMERO_CONTRAT,&lt;BR /&gt;FECHA;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE ORIGEN;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 22:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775809#M60131</guid>
      <dc:creator>lomi89</dc:creator>
      <dc:date>2021-01-19T22:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare last year Sales</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775841#M60133</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;no need to complicate,&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;FECHA as Date,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P&gt;from load file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table&lt;/P&gt;&lt;P&gt;DIM = Year(FECHA)&lt;/P&gt;&lt;P&gt;Measure=Sum(Sales)&lt;/P&gt;&lt;P&gt;table as blow&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksrinivasan_0-1611116142631.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47429iB5954E5D7BB7A805/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksrinivasan_0-1611116142631.png" alt="Ksrinivasan_0-1611116142631.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ksrinivasan&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 04:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775841#M60133</guid>
      <dc:creator>Ksrinivasan</dc:creator>
      <dc:date>2021-01-20T04:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Compare last year Sales</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775897#M60141</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;ksrinivasan but I didn't explain very well.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I would need a table for getting this graph:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47457iED176F3781DE20D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example.PNG" alt="example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example table.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47458i49BA3521D8C76507/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example table.PNG" alt="example table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The problem is when I check the current sales in a specific month with previous sales (really the same) , the figures are a little different.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 07:37:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1775897#M60141</guid>
      <dc:creator>lomi89</dc:creator>
      <dc:date>2021-01-20T07:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compare last year Sales</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1776059#M60161</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes you can create bar chart with this data what we get from script.&lt;/P&gt;&lt;P&gt;instead of year (FECHA)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date([FECHA],'MMM-YYYY') as Month_Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can call in chart as&lt;/P&gt;&lt;P&gt;DIM=Month_Year&lt;/P&gt;&lt;P&gt;Measure=Sum(Sales)&lt;/P&gt;&lt;P&gt;chart will be your way,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ksrinivasan&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 17:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-last-year-Sales/m-p/1776059#M60161</guid>
      <dc:creator>Ksrinivasan</dc:creator>
      <dc:date>2021-01-20T17:18:12Z</dc:date>
    </item>
  </channel>
</rss>

