<?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 YTD,QTD MTD Tables with Sum(Sales) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214840#M68344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lots of ways and it depends on what you're after. If it's always based on the current date, you could just load up YTD, QTD and MTD flags with your raw data based on the sales date vs. today(). Then just reference the flags, such as:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = Date&lt;BR /&gt;YTD = sum({&amp;lt;YTD={1}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;If it's always based on a selected date, or the most recent selected date, then something like:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;YTD = sum({&amp;lt;Year={'$(=max(Year))'},Quarter=,Month=,Date={"&amp;lt;=$(=max(Date))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;If you want to be able to see all the dates of the year, each with their own YTD, QTD, MTD data, all at the same time, then I'd handle it with data:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;AsOf:&lt;BR /&gt;LOAD DISTINCT Date as AsOfDate&lt;BR /&gt;RESIDENT Whatever&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (AsOf)&lt;BR /&gt;LOAD AsOfDate as Date&lt;BR /&gt;RESIDENT AsOf&lt;BR /&gt;;&lt;BR /&gt;INNER JOIN (AsOf)&lt;BR /&gt;LOAD *,1 as YTD&lt;BR /&gt;RESIDENT (AsOf)&lt;BR /&gt;WHERE year(AsOfDate) = year(Date)&lt;BR /&gt; AND AsOfDate &amp;gt;= Date&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (AsOf)&lt;BR /&gt;LOAD *&lt;BR /&gt;,if(quarterstart(AsOfDate)=quarterstart(Date),1) as QTD&lt;BR /&gt;,if(monthstart(AsOfDate)=monthstart(Date),1) as MTD&lt;BR /&gt;RESIDENT (AsOf)&lt;BR /&gt;;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = AsOfDate&lt;BR /&gt;YTD = sum({&amp;lt;YTD={1}&amp;gt;} Sales)&lt;BR /&gt;etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Sep 2010 01:00:29 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-09-23T01:00:29Z</dc:date>
    <item>
      <title>YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214839#M68343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone can any one tell me how to create a Sales chart with YTD,QTD,MTD with Sum of Sales please..,Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard's&lt;/P&gt;&lt;P&gt;shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 00:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214839#M68343</guid>
      <dc:creator />
      <dc:date>2010-09-23T00:45:23Z</dc:date>
    </item>
    <item>
      <title>YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214840#M68344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lots of ways and it depends on what you're after. If it's always based on the current date, you could just load up YTD, QTD and MTD flags with your raw data based on the sales date vs. today(). Then just reference the flags, such as:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = Date&lt;BR /&gt;YTD = sum({&amp;lt;YTD={1}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;If it's always based on a selected date, or the most recent selected date, then something like:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;YTD = sum({&amp;lt;Year={'$(=max(Year))'},Quarter=,Month=,Date={"&amp;lt;=$(=max(Date))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;If you want to be able to see all the dates of the year, each with their own YTD, QTD, MTD data, all at the same time, then I'd handle it with data:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;AsOf:&lt;BR /&gt;LOAD DISTINCT Date as AsOfDate&lt;BR /&gt;RESIDENT Whatever&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (AsOf)&lt;BR /&gt;LOAD AsOfDate as Date&lt;BR /&gt;RESIDENT AsOf&lt;BR /&gt;;&lt;BR /&gt;INNER JOIN (AsOf)&lt;BR /&gt;LOAD *,1 as YTD&lt;BR /&gt;RESIDENT (AsOf)&lt;BR /&gt;WHERE year(AsOfDate) = year(Date)&lt;BR /&gt; AND AsOfDate &amp;gt;= Date&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (AsOf)&lt;BR /&gt;LOAD *&lt;BR /&gt;,if(quarterstart(AsOfDate)=quarterstart(Date),1) as QTD&lt;BR /&gt;,if(monthstart(AsOfDate)=monthstart(Date),1) as MTD&lt;BR /&gt;RESIDENT (AsOf)&lt;BR /&gt;;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = AsOfDate&lt;BR /&gt;YTD = sum({&amp;lt;YTD={1}&amp;gt;} Sales)&lt;BR /&gt;etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 01:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214840#M68344</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-23T01:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214841#M68345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;That's pretty slick.&amp;nbsp; Simple, elegant and fast.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In terms of user selections, I believe you also need to base your user selections on the AsOfDate instead of the date and then have your chart dimensions be based on the date ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="AsOf.gif" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6154_AsOf.gif" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 18:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214841#M68345</guid>
      <dc:creator>mschroff</dc:creator>
      <dc:date>2011-07-27T18:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214842#M68346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached one file .This file helpful MTD/YTD for sales&amp;nbsp; ,others&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 03:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214842#M68346</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2011-07-28T03:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214843#M68347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's also very impressive as far as set analysis goes.&amp;nbsp; A very nice example of how to do things in different ways, thanks for uploading that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question for you: how much data can that handle?&amp;nbsp; Would it have trouble with a large data set since so much is done via set analysis in the charts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 04:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214843#M68347</guid>
      <dc:creator>mschroff</dc:creator>
      <dc:date>2011-07-28T04:05:21Z</dc:date>
    </item>
    <item>
      <title>YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214844#M68348</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;I have used the technic given by john to calculate all my indicators: YTD, MTD, YTD-1,...&lt;/P&gt;&lt;P&gt;It is very efficient as I can put a slider and see how behave the YTD from 1month to another. I am no longer stuck to the YTD of the current month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is that I can't calculate the %growth between YTD and YTD-1&lt;/P&gt;&lt;P&gt;Here is my initial post, including my code:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/103934#103934"&gt;http://community.qlik.com/message/103934#103934&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could i solve my problem? (related topic: &lt;A _jive_internal="true" href="https://community.qlik.com/message/105237#105237"&gt;http://community.qlik.com/message/105237#105237&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 07:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214844#M68348</guid>
      <dc:creator />
      <dc:date>2011-07-29T07:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214845#M68349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Could you please give insight, how we can use YTD,QTD filters on UI. Lets say, i am selecting Period Type as QTD and selecting a particular date e.g 4/8/2014, then my data should show from 1/8/2014. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 13:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214845#M68349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-08T13:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,QTD MTD Tables with Sum(Sales)</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214846#M68350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to use these flags in CY,FPY,SPF in set analysis for calulating sum of sales&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 11:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-QTD-MTD-Tables-with-Sum-Sales/m-p/214846#M68350</guid>
      <dc:creator>silambarasan</dc:creator>
      <dc:date>2015-12-18T11:34:03Z</dc:date>
    </item>
  </channel>
</rss>

