<?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: Days difference between column of dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387697#M144663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use it as a calculated dimension, only as an expression. Use Date as your dimension and above(Date)-Date as expression. If it's a date type in SQL then you shouldn't need the date# function. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2013 13:13:20 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-03-25T13:13:20Z</dc:date>
    <item>
      <title>Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387694#M144660</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;I have a column of dates in the yyyy-mm-dd format.&amp;nbsp; What I would like to achieve is to add a column (either an expression or a calculated dimension) that calculates the difference in number of days between a date and the previous date, e.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Difference_in_days&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-03-20&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-03-15&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-03-14&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-03-10&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2013-03-01&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how to go about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 12:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387694#M144660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-25T12:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387695#M144661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the above function in tables and charts: above(Date) - Date. Make sure the dates are real dates and not strings. Use the date# function if necessary: date#(Date, 'YYYY-MM-DD')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 12:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387695#M144661</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-25T12:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387696#M144662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert.&amp;nbsp; In SQL my column Date is set as type date so do I still need to set the date# function within Qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, above(Date)-Date is returning "// Error in calculated dimension".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 13:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387696#M144662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-25T13:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387697#M144663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use it as a calculated dimension, only as an expression. Use Date as your dimension and above(Date)-Date as expression. If it's a date type in SQL then you shouldn't need the date# function. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 13:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387697#M144663</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-25T13:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387698#M144664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again.&amp;nbsp; I've added it as an expression but just see hyphens in the expression output.&amp;nbsp; I'll try using the date# function to see if it makes a difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 13:25:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387698#M144664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-25T13:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387699#M144665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my Script I have:&amp;nbsp; SET DateFormat='YYYY-MM-DD';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in my table the date is right aligned so it appears Qlikview is recognising it as a date.&amp;nbsp; As a test I added an expression =Date and then converted it to a number format and this looks correct also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I'm confident the dates are recognised by Qlikview and I do not need to use the date# function but the expression results are still showing as null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387699#M144665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-25T14:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387700#M144666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using more than one dimension? Take care of the so called column segments. You may need to use the TOTAL qualifier with the above() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387700#M144666</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-03-25T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Days difference between column of dates</title>
      <link>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387701#M144667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion.&amp;nbsp; &lt;STRONG&gt;Above &lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;(Total Date) - Date&lt;/STRONG&gt; seems to have done the trick.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Days-difference-between-column-of-dates/m-p/387701#M144667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-25T14:35:39Z</dc:date>
    </item>
  </channel>
</rss>

