<?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: Current date Sales VS same date in previous year Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696370#M476087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Gloria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What wet wrong is the Set Analysis syntax. You should use a expression like this (depending on how your date is formated):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OrderDate&lt;/SPAN&gt; = {$(=AddYears(OrderDate,-1))}&amp;gt;} Sale/Rate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This will give you the sales of the same day last year. Notice that for it to work, you need to have only one OrderDate selected. Please remember that Set Analysis is evaluated only once per chart and not in a per row basis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2014 12:12:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-06-18T12:12:32Z</dc:date>
    <item>
      <title>Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696364#M476081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a chart showing the current dates (selected by users) sales and sales generating on same dates in previous year. We only have a column OrderDate in the format of mm/dd/yyyy, how can I use expressions to get it done? Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 17:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696364#M476081</guid>
      <dc:creator />
      <dc:date>2014-06-17T17:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696365#M476082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this demo, it has exactly what you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 18:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696365#M476082</guid>
      <dc:creator />
      <dc:date>2014-06-17T18:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696366#M476083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. The demo is helpful. But I am wondering how to use date or convert function to get the same date in previous year. Can you help me out with this one? Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 18:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696366#M476083</guid>
      <dc:creator />
      <dc:date>2014-06-17T18:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696367#M476084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To convert a date to the same date in previous year, you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AddYears(Date, -1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 18:45:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696367#M476084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-17T18:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696368#M476085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gloria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you a dimension like Sales and you have a date, you can build a expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({1&amp;lt;YearMonth={$(vPrevYearMonth)}&amp;gt;} Sales)/1000000 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where vPrevYearMonth is a variable:&lt;/P&gt;&lt;P&gt;=Num(Year(Max(Date))-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JFlorian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 19:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696368#M476085</guid>
      <dc:creator>javier_florian</dc:creator>
      <dc:date>2014-06-17T19:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696369#M476086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brono,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your reply. So can I use sum({&amp;lt;AddYears(OrderDate,-1)&amp;gt;} Sale/Rate) to calculate the sales in the previous year? I tried in qlikview, but it gave me error. Do you know what went wrong? Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 19:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696369#M476086</guid>
      <dc:creator />
      <dc:date>2014-06-17T19:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696370#M476087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Gloria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What wet wrong is the Set Analysis syntax. You should use a expression like this (depending on how your date is formated):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OrderDate&lt;/SPAN&gt; = {$(=AddYears(OrderDate,-1))}&amp;gt;} Sale/Rate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This will give you the sales of the same day last year. Notice that for it to work, you need to have only one OrderDate selected. Please remember that Set Analysis is evaluated only once per chart and not in a per row basis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 12:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696370#M476087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-18T12:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696371#M476088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your reply. I am wondering if there is a way flexible enough to show me the sales of the same period last year, which means no matter how many days my user select, it will show them the same period last year. Thank&amp;nbsp; you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gloria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 16:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696371#M476088</guid>
      <dc:creator />
      <dc:date>2014-06-18T16:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Current date Sales VS same date in previous year Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696372#M476089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hi, Gloria.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Try something like this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;OrderDate&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; = {"&amp;gt;='$(=AddYears(Min(OrderDate),-1))'&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;='$(=AddYears(Max(OrderDate),-1))'"&lt;/SPAN&gt;}&amp;gt;} Sale/Rate)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 16:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-date-Sales-VS-same-date-in-previous-year-Sales/m-p/696372#M476089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-18T16:36:39Z</dc:date>
    </item>
  </channel>
</rss>

