<?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 sales with previous year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48886#M784969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be honest I tried it before but I was getting zeros...only after I copy and paste your answer worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again so much !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2018 12:49:59 GMT</pubDate>
    <dc:creator>kostiskampouris</dc:creator>
    <dc:date>2018-03-05T12:49:59Z</dc:date>
    <item>
      <title>Compare sales with previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48884#M784967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few months before and with a lot of help from the community i created a document.where more or less the user selects a day(trn_date) and through a button which gives value to a variable vdatetodate sees either the selected day's sold quantity vs the same &lt;STRONG&gt;weekday's&lt;/STRONG&gt; last year quantity (vdatetodate=0) or the selected day's quantity vs the the same &lt;STRONG&gt;date's &lt;/STRONG&gt;last year quantity&lt;SPAN style="font-size: 13.3333px;"&gt; (vdatetodate=1) &lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Καταγραφή.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/195297_Καταγραφή.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;selected date 03/03/2018&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The set analysis I have used is :&lt;/P&gt;&lt;P&gt;pick (datetodate,&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;trn_date = {"$(=TimeStamp(Max(trn_date-364), 'DD/MM/YYYY'))"}&amp;gt;} qty),//compares with same weekday last year&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;trn_date = {"$(=AddMonths(Max(trn_date), -12))"}&amp;gt;}qty)&lt;SPAN style="font-size: 13.3333px;"&gt;//compares with exact same date last year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;My problem is that when &lt;SPAN style="font-size: 13.3333px;"&gt; vdatetodate=1 I get no Qty for last year.This problem apeared only after 2017 ended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(For example for any day of the 12/2017 works perfect).&lt;/P&gt;&lt;P&gt;I have checked and the data are correct!&lt;/P&gt;&lt;P&gt;Also my date as I insert it from sql server has the format&amp;nbsp; for example &lt;STRONG&gt;2018-03-03 00:00:00.000 ( &lt;/STRONG&gt;I dont know if may this is the problem)&lt;/P&gt;&lt;P&gt;Can someone please suggest a solution ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48884#M784967</guid>
      <dc:creator>kostiskampouris</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sales with previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48885#M784968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this the expression which isn't working?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/195311_Capture.PNG" style="height: 112px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you need date formatting for this also?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum({&amp;lt;trn_date = {"$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TimeStamp(&lt;/SPAN&gt;AddMonths(Max(trn_date), -12)&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, 'DD/MM/YYYY')&lt;/SPAN&gt;)"}&amp;gt;}qty)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48885#M784968</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-05T12:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sales with previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48886#M784969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be honest I tried it before but I was getting zeros...only after I copy and paste your answer worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again so much !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48886#M784969</guid>
      <dc:creator>kostiskampouris</dc:creator>
      <dc:date>2018-03-05T12:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare sales with previous year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48887#M784970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you misplaced parenthesis... but glad it worked now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-sales-with-previous-year/m-p/48887#M784970</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-05T12:51:53Z</dc:date>
    </item>
  </channel>
</rss>

