<?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: Timestamp expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156474#M893330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrizio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2016 11:26:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-10T11:26:14Z</dc:date>
    <item>
      <title>Timestamp expression</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156470#M893326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with a Time Chart. &lt;/P&gt;&lt;P&gt;I have an database which contains data in the format below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 384px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="64"&gt;Customer&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="64"&gt;Product&lt;/TD&gt;&lt;TD class="xl64" style="border-left-style: none; text-align: center;" width="64"&gt;Year&lt;/TD&gt;&lt;TD class="xl64" style="border-left-style: none; text-align: right;" width="64"&gt;Month&lt;/TD&gt;&lt;TD class="xl64" style="border-left-style: none; text-align: right;" width="64"&gt;Turnover&lt;/TD&gt;&lt;TD class="xl64" style="border-left-style: none; text-align: right;" width="64"&gt;Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Z&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;400&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;X&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;800&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;W&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2015&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;500&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;600&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;F&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;W&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;450&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to calculate (MTD and YTD)&amp;nbsp; TO and Qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion about&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Base expression&lt;/LI&gt;&lt;LI&gt;Timestamp expression&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Basedate expression&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Fabrizio&lt;BR /&gt;&lt;/SPAN&gt;&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/Timestamp-expression/m-p/1156470#M893326</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp expression</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156471#M893327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess the first step would be to create a date field (better than working with Year and Month fields separately). To create date, you can do like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(MakeDate(Year, Month, 1)) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then there are bunch of ways you can calculated YTD and MTD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create flags in the script - &lt;A href="https://community.qlik.com/thread/48693"&gt;Creating A Master Calendar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) Use set analysis to see a range of date - &lt;A href="https://community.qlik.com/docs/DOC-6163"&gt;YTQ, QTD, MTD and WTD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3) Use As-Of Table - &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 16:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156471#M893327</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-09T16:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp expression</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156472#M893328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Store current month &amp;amp; year into 2 variables.&lt;/P&gt;&lt;P&gt;V_mnth= Month(today())&lt;/P&gt;&lt;P&gt;V_year= Year(today())&lt;/P&gt;&lt;P&gt;for current YTD= sum({&amp;lt;Year=V_year&amp;gt;}Qty)&lt;/P&gt;&lt;P&gt;for current MTD= sum({&amp;lt;Month=V_mnth&amp;gt;}Qty)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 20:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156472#M893328</guid>
      <dc:creator />
      <dc:date>2016-08-09T20:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp expression</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156473#M893329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need a date in your data to calculate YTD and MTD (periodo starting at the beginnng of current year / month and ending at the &lt;STRONG&gt;current date&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;Then you can use the first link from Sunny post and set analysis, something like &lt;/P&gt;&lt;P&gt;sum({$ &amp;lt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;CurYTDFlag={1}&lt;/SPAN&gt;&amp;gt; Qty} &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 21:31:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156473#M893329</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-09T21:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp expression</title>
      <link>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156474#M893330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrizio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 11:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Timestamp-expression/m-p/1156474#M893330</guid>
      <dc:creator />
      <dc:date>2016-08-10T11:26:14Z</dc:date>
    </item>
  </channel>
</rss>

