<?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 Calc !!! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213897#M67525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct, that is the way of doing it on the most correct way i suppose, but if can have the syntax to do this in the front end, i can use it on string values etc. To not pass a Field but a calculation in set analysis.&lt;/P&gt;&lt;P&gt;Read My first post,&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jul 2010 09:56:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-05T09:56:08Z</dc:date>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213893#M67521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a question if I do the following it works, it's a year to date calc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;Period ={"&amp;gt;=$(=date(yearstart(today(),-1),'YYYYMM')) &amp;lt;=$(=date(addmonths(today(),-13),'YYYYMM'))"}, [Product Manufacturer] = {'Aspen-Pharmacare'} &amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now when I want to do the following it doesn't work (Have a look at the period)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;YR*100+MTH ={"&amp;gt;=$(=date(yearstart(today(),-1),'YYYYMM')) &amp;lt;=$(=date(addmonths(today(),-13),'YYYYMM'))"}, [Product Manufacturer] = {'Aspen-Pharmacare'} &amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the calc to get to my period, its in the back end, but when I do it in the front end, it incorrect, I think its got something to do with the Syntax I think it needs quotes etc like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt;=$("YR*100+MTH") ={"&amp;gt;=$(=date(yearstart(today(),-1),'YYYYMM')) &amp;lt;=$(=date(addmonths(today(),-13),'YYYYMM'))"}, [Product Manufacturer] = {'Aspen-Pharmacare'} &amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance J&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 09:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213893#M67521</guid>
      <dc:creator />
      <dc:date>2010-07-05T09:03:10Z</dc:date>
    </item>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213894#M67522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;What is YR*100+MTH ? It's fieldName? As I know, in set Analysis you can use FieldName only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 09:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213894#M67522</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-07-05T09:08:51Z</dc:date>
    </item>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213895#M67523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YR is a Field Name as well as the MTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They look like this YR = 2009&lt;/P&gt;&lt;P&gt;MTH = 1&lt;/P&gt;&lt;P&gt;So YR*100+MTH = 200901 That creates a "period" Or YearMonth...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 09:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213895#M67523</guid>
      <dc:creator />
      <dc:date>2010-07-05T09:13:43Z</dc:date>
    </item>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213896#M67524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Although I would create that field in the master calendar so you can reference it as "period" or "year-month" field (or dimension if any), you can check the year and month (that you already have as YR and MTH) from the date field.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 09:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213896#M67524</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-07-05T09:21:51Z</dc:date>
    </item>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213897#M67525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct, that is the way of doing it on the most correct way i suppose, but if can have the syntax to do this in the front end, i can use it on string values etc. To not pass a Field but a calculation in set analysis.&lt;/P&gt;&lt;P&gt;Read My first post,&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 09:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213897#M67525</guid>
      <dc:creator />
      <dc:date>2010-07-05T09:56:08Z</dc:date>
    </item>
    <item>
      <title>YTD Calc !!!</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213898#M67526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Say you don't have a "Year" field but you can check for a given year in your Set Analysis. This is one way to do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;{&amp;lt; DateField = {"=Year(DateField) = '2009'"} &amp;gt;}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The first part of the set condition must be always a field name. So you will need to check first for year (2009), then for month (1), to get the period you want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;{&amp;lt; DateField = {"=Year(DateField) = '2009'"}, DateField = {"=Month(DateField) = 'jan'"} &amp;gt;}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but I understand that you already have year and month field, although not in 'YYYYMM' format, and that's why you I'd rather separate both.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 10:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calc/m-p/213898#M67526</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-07-05T10:42:01Z</dc:date>
    </item>
  </channel>
</rss>

