<?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: Calculation between dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367239#M30795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another method....&lt;/P&gt;&lt;P&gt;Script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(AddMonths([Beginning of Contract], IterNo() - 1)) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month(AddMonths([Beginning of Contract], IterNo() - 1)) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year(AddMonths([Beginning of Contract], IterNo() - 1)) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthName(AddMonths([Beginning of Contract], IterNo() - 1)) as MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While AddMonths([Beginning of Contract], IterNo() - 1) &amp;lt;= [End of Contract];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; No. of Contract, Beginning of Contract, End of Contract&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, 01/04/2017, 31/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456, 01/01/2017, 30/04/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 789, 31/12/2017, 31/12/2018&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT [No. of Contract])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 17:32:04 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-07-26T17:32:04Z</dc:date>
    <item>
      <title>Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367237#M30793</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;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;I am trying to calculate a value between dates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The i&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;nformation I have is as follows, No. of Contract, Beginning of Contract, End of Contract.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;Objective, know how many contracts are active in a given month, or day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;No. of Contract&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Beginning of Contract&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;End of Contract&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/04/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31/12/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;456&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/01/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30/04/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;789&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31/12/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31/12/2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;In the table above I would have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;April month; 2 active contracts (Contract 123 and 456)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;01/05/2017; 1 Contract assets (Contract 123)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; font-family: 'Calibri',sans-serif; font-size: 11pt;"&gt;01/01/2018; 1 Active contract (Contract 789)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out with the solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Fernando Rodrigues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 10:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367237#M30793</guid>
      <dc:creator>ptl14495</dc:creator>
      <dc:date>2017-07-25T10:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367238#M30794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;A href="https://community.qlik.com/qlik-blogpost/3037"&gt;IntervalMatch&lt;/A&gt; to connect your master calendar with the fact table and then use Month or MonthYear as dimension.... and count(distinct contracts) as your expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367238#M30794</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-26T17:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367239#M30795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another method....&lt;/P&gt;&lt;P&gt;Script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(AddMonths([Beginning of Contract], IterNo() - 1)) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month(AddMonths([Beginning of Contract], IterNo() - 1)) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year(AddMonths([Beginning of Contract], IterNo() - 1)) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthName(AddMonths([Beginning of Contract], IterNo() - 1)) as MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While AddMonths([Beginning of Contract], IterNo() - 1) &amp;lt;= [End of Contract];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; No. of Contract, Beginning of Contract, End of Contract&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, 01/04/2017, 31/12/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456, 01/01/2017, 30/04/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 789, 31/12/2017, 31/12/2018&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthYear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT [No. of Contract])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 17:32:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367239#M30795</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-26T17:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367240#M30796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to do this in the app itself, with an expression.&lt;/P&gt;&lt;P&gt;I have seen your solutions and i think they both include script editing (something i am not ready for yet &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you think this solution could work as well?&lt;/P&gt;&lt;P&gt;Count( {$&amp;lt;Year = {“&amp;gt;2014/04/01&amp;lt;2014/04/30”} &amp;gt;}, [No. of Contracts] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to teste since Qlik is currently offline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Fernando Rodrigues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 08:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367240#M30796</guid>
      <dc:creator>ptl14495</dc:creator>
      <dc:date>2017-07-28T08:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367241#M30797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;My goal is to count how many contracts are "live" in a specific Year, Month Day.&lt;/P&gt;&lt;P&gt;for that, i must set two variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I want to know how many contracts are "live" in 01/02/2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that i must say that,&lt;/P&gt;&lt;P&gt;count all contracts that meet these two criterias,&lt;/P&gt;&lt;P&gt;Beginning of the Contract &amp;gt;=01/02/2017&lt;/P&gt;&lt;P&gt;End of Contract &amp;gt;=01/02/2017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Fernando Rodrigues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367241#M30797</guid>
      <dc:creator>ptl14495</dc:creator>
      <dc:date>2017-07-28T14:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367242#M30798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you have two dates, you need a third date which may be from your master calendar? Do you have a master calendar setup? You might be able to use a front end logic to do this... but I would highly recommend against it. The reason is very simple, the front end expression will be complex and will slow down your dashboard. If that is not an issue, we can work on getting it done on front end as well (all you need is a calendar script or something around an independend MonthYear field)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 15:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367242#M30798</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-28T15:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367243#M30799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't created a Master Calendar yet and actually i don't know how.&lt;/P&gt;&lt;P&gt;How can/should i do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Fernando Rodrigues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 15:48:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367243#M30799</guid>
      <dc:creator>ptl14495</dc:creator>
      <dc:date>2017-07-28T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation between dates</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367244#M30800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/48693"&gt;Creating A Master Calendar&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 16:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-between-dates/m-p/1367244#M30800</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-28T16:22:58Z</dc:date>
    </item>
  </channel>
</rss>

