<?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: Difference between two date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643085#M235641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you would need to evaluate your difference-of-dates expression in a calculation scope where each single expression can be evaluated. For example, if each of your expressions limits the values of NameAttivita to different, disjunct values, and you are using NameAttivita as dimension, the calculation scope of both expressions is disjunct also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thin you would either need to remove dimensions, like NameAttivita, or try using the TOTAL qualifier with a field list, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= only({&amp;lt;... &amp;gt;} TOTAL&amp;lt;CaseNumber,Sottocategoria, Commodity__c,Target__C&amp;gt; CreatedDate_Attivita) - &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;only({&amp;lt;... &amp;gt;} TOTAL&amp;lt;CaseNumber,Sottocategoria, Commodity__c,Target__C&amp;gt;&lt;/SPAN&gt; LastModifiedDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;But it's quite hard to help you without knowing your data model and requirements, so if possible upload a sample application together with your expected result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jun 2014 14:56:05 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2014-06-07T14:56:05Z</dc:date>
    <item>
      <title>Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643078#M235634</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;i need to calculate difference between two date( CreatedDate_Attività and LastDateModified) that they have different filter conditions.&lt;/P&gt;&lt;P&gt;I try to do this with &lt;STRONG style="color: #3366ff;"&gt;only &lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;function&lt;/SPAN&gt; but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in particular i want to calculate difference between :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression A :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;IdAttività=P({&amp;lt;Categoria__c={'Attivazione'},NameAttività={'Credit Check','Credit check'},State__c={'Nuovo'},Stato_Pipeline={'1 Check Doc','2 Credit Check','3 Check Call','3 Check Letter','4 Gest. UTF','5 Invio Recessi','6 DL','6 DL KO','7 Non fatturabile','8 Fatturabile','0 Annullamenti'}&amp;gt;})+&lt;/P&gt;&lt;P&gt;p({&amp;lt;Categoria__c={'Attivazione'},Sottocategoria__c={'Contatore Posato Gas','Contatore Posato Power','Voltura','Switch attivo','Posa nuovo contatore Gas','Nuovo allaccio e attivazione Power'},NameAttività={'Credit Check','Credit check'},State__c={'Attivo'},Stato_Pipeline={'7 Non fatturabile'}&amp;gt;})&amp;gt;} &lt;STRONG&gt;CreatedDate_Attività&lt;/STRONG&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression B:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;IdAttività =P({&amp;lt;Categoria__c={'Attivazione'},NameAttività={'Invio a IDM e registrazione Esito'},LastModifiedDate=,State__c={'Nuovo'},StatoAttività={'Eseguita'},Esito__c={'OK'},Stato_Pipeline={'1 Check Doc','2 Credit Check','3 Check Call','3 Check Letter','4 Gest. UTF','5 Invio Recessi','6 DL','6 DL KO','7 Non fatturabile','8 Fatturabile','0 Annullamenti'}&amp;gt;})&lt;/P&gt;&lt;P&gt;+p({&amp;lt;Categoria__c={'Attivazione'}, NameAttività={'Invio a IDM e registrazione Esito'},LastModifiedDate=,State__c={'Attivo'},Esito__c={'OK'}, StatoAttività={'Eseguita'},Stato_Pipeline={'7 Non fatturabile'}&amp;gt;})&amp;gt;} &lt;STRONG&gt;LastModifiedDate&lt;/STRONG&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can&amp;nbsp; i do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 18:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643078#M235634</guid>
      <dc:creator />
      <dc:date>2014-06-06T18:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643079#M235635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do both expressions return something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where / in which context are you using these expressions (in a chart (with which dimensions?), a text object)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you ensured, that both dates are have indeed a numeric representation?&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/02/19/why-don-t-my-dates-work" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/19/why-don-t-my-dates-work"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/19/why-don-t-my-dates-work&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If both expressions do return a date, i.e. something that have a numeric representation so you can do calculations on, you should be able to just subtract the one from the other:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= only(... CreatedDate_Attivita) - only(... LastModifiedDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give you the difference as fraction of days.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 10:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643079#M235635</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-06-07T10:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643080#M235636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First question is does your statement return a value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can done the difference by using the label or column of [Expression A] - [Expression B] .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other option would be to do the calculation in the script and that way you will have a field with the value for the UI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CreatedDate_Attivita-LastModifiedDate as Date_Diff, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the UI you can do this &lt;/P&gt;&lt;P&gt;=only(Date_Diff) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which will also be faster and impact lest on the server resource &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 11:12:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643080#M235636</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2014-06-07T11:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643081#M235637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expressions returns both number of day between LastModifiedDate and CreatedData_Attività.&lt;/P&gt;&lt;P&gt;I use this expression in a linear table. &lt;/P&gt;&lt;P&gt;I want to know number of day between those two dates, but LasModifiedDate has a specific filter ... and Created Data has other specific filter, so i can't use in one only function.&lt;/P&gt;&lt;P&gt;I try to do only... - only... but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 11:48:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643081#M235637</guid>
      <dc:creator />
      <dc:date>2014-06-07T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643082#M235638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The single expression return a date with specific condition ( Categoria = {'Attivazione'} etc) that it is different for CreatedData and LastDateModified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't do CreatedDate_Attività - LastModifiedDate, because i want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CreatedDate_Attività for Categoria = attivazione and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;NameAttività={'Credit Check','Credit check'} etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;LastModifiedDate for CaTegoria = Attivazione and &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;NameAttività={'Invio a IDM e registrazione Esito'}&lt;/SPAN&gt; etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 11:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643082#M235638</guid>
      <dc:creator />
      <dc:date>2014-06-07T11:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643083#M235639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you upload a sample of the file I can have a look&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 12:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643083#M235639</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2014-06-07T12:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643084#M235640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="example.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/60282_example.png" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;This is an example.&amp;nbsp; I want difference between CreatedDate and LastModified Date. &lt;/P&gt;&lt;P&gt;How you can see in the image, The NameAttività is different for CreatedDate and LastModifiedDate.&lt;/P&gt;&lt;P&gt;How can i make difference between those two dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 14:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643084#M235640</guid>
      <dc:creator />
      <dc:date>2014-06-07T14:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643085#M235641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you would need to evaluate your difference-of-dates expression in a calculation scope where each single expression can be evaluated. For example, if each of your expressions limits the values of NameAttivita to different, disjunct values, and you are using NameAttivita as dimension, the calculation scope of both expressions is disjunct also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thin you would either need to remove dimensions, like NameAttivita, or try using the TOTAL qualifier with a field list, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= only({&amp;lt;... &amp;gt;} TOTAL&amp;lt;CaseNumber,Sottocategoria, Commodity__c,Target__C&amp;gt; CreatedDate_Attivita) - &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;only({&amp;lt;... &amp;gt;} TOTAL&amp;lt;CaseNumber,Sottocategoria, Commodity__c,Target__C&amp;gt;&lt;/SPAN&gt; LastModifiedDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;But it's quite hard to help you without knowing your data model and requirements, so if possible upload a sample application together with your expected result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 14:56:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643085#M235641</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-06-07T14:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two date</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643086#M235642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I normally would do this type of things in the script or data model, at the end this will even help with the performance of the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming your data looks like this &lt;IMG alt="1.png" class="jive-image jiveImage" src="https://community.qlik.com/legacyfs/online/60280_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Is there a reason as to why you cannot do a left join to append the a field with lastmodified date to your registration date ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 15:12:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-date/m-p/643086#M235642</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2014-06-07T15:12:29Z</dc:date>
    </item>
  </channel>
</rss>

