<?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 Date +1 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-1/m-p/294429#M1187106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The due files are linked by the customer number, loan number.&amp;nbsp; I have a concatenated field in the script that states that the due customer number+due loan number+(due date+1) equals the due.match1.&amp;nbsp; If due.match1=paid date then I want the paid transaction amount.&amp;nbsp; That field would be called - paid 1 day late because if something is due 9/12 but paid on 9/13 the due+1 field should give me 9/13 - right?&amp;nbsp; &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hm I don't really understand, how does your script line for this looks like?&lt;/P&gt;&lt;P&gt;If you concatenate a customer number and loan number and (due date+1) you are getting a date to compare with paid date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume your dates are correctly recognizes as Date type, so your calculated dimension returns correct dates for this month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point in not using a string in the else part of your if() function is, that you want get your string back if all or any records will lead to executing your else-statement, because of the sum (I believe you can't sum a string, It will return zero at best). If you need to verify that the else part is executed, you might change the then part to zero and use 1 for the else part as in&lt;/P&gt;&lt;P&gt;= sum(if(([Due.Due Date]+1)= Paid.TranDate and Paid.CustomerNbr=Due.CustomerNbr, 0,1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use this as first expression and the counter part&lt;/P&gt;&lt;P&gt;= sum(if(([Due.Due Date]+1)= Paid.TranDate and Paid.CustomerNbr=Due.CustomerNbr, 1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then the sum of both values should be equal to the number of records for that date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see anything really wrong with your expression but maybe I am missing something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using separate expressions for part of your total expression, like&lt;/P&gt;&lt;P&gt;= [Due.Due Date]&lt;/P&gt;&lt;P&gt;= [Due.Due Date]+1&lt;/P&gt;&lt;P&gt;= Paid.TranDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe there is an issue with your date comparison, try also putting date around both parts:&lt;/P&gt;&lt;P&gt;= sum(if(date([Due.Due Date]+1)= date(Paid.TranDate) and Paid.CustomerNbr=Due.CustomerNbr, Paid.TranAmount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have still problems, maybe you could post a small app here in the forum which shows your problem (it doesnt need to use your original data if this is a problem). At best, it is self contained, i.e. it is possible to reload (no need for further files, e.g. by using INLINE LOADs). Upload is available from the advanced editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps a little,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 18:42:17 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-09-28T18:42:17Z</dc:date>
    <item>
      <title>Date +1</title>
      <link>https://community.qlik.com/t5/QlikView/Date-1/m-p/294426#M1187103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a formula that keeps coming back $0, but I know there are totals.&amp;nbsp; I am trying to build a chart that shows how many days a payment is made after it is due.&amp;nbsp; 1 day, 2 days, etc etc.&amp;nbsp; So, i have a due date, paid date, and customer numbers.&amp;nbsp; The formula that i have is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if([Due.Due Date]+2=Paid.TransactionDate and [Due.CustomerNbr]=Paid.CustomerNbr, Paid.TransactionAmount,'try again'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help is appreciated as always!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kristy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 15:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-1/m-p/294426#M1187103</guid>
      <dc:creator />
      <dc:date>2011-09-27T15:15:39Z</dc:date>
    </item>
    <item>
      <title>Date +1</title>
      <link>https://community.qlik.com/t5/QlikView/Date-1/m-p/294427#M1187104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning Kristy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you tell us a little more about your data model, especially how the tables Due and Paid are linked? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How / where do you use above expression? In a chart? If so, what are your dimensions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried with either one of your two AND operands only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S: I think it will not affect your results, but personally I wouldn't use a string as part of my sum ('try again').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 16:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-1/m-p/294427#M1187104</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-27T16:38:12Z</dc:date>
    </item>
    <item>
      <title>Date +1</title>
      <link>https://community.qlik.com/t5/QlikView/Date-1/m-p/294428#M1187105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The due files are linked by the customer number, loan number.&amp;nbsp; I have a concatenated field in the script that states that the due customer number+due loan number+(due date+1) equals the due.match1.&amp;nbsp; If due.match1=paid date then I want the paid transaction amount.&amp;nbsp; That field would be called - paid 1 day late because if something is due 9/12 but paid on 9/13 the due+1 field should give me 9/13 - right?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an expression in a pivot table.&amp;nbsp; the dimensions are the current month - =if(month(Today())=month((Due.Paid.Date)),Due.Paid.Date,)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I have tried the formula = sum(if(([Due.Due Date]+1)= Paid.TranDate and Paid.CustomerNbr=Due.CustomerNbr, Paid.TranAmount,))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize that about then 'Then' statement of the expression.&amp;nbsp; I wanted to see if it actually resulted in the string.&amp;nbsp; Since I know there is a total but it is coming up $0 instead of Try Again, I think there is something incorrect in my expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kristy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 18:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-1/m-p/294428#M1187105</guid>
      <dc:creator />
      <dc:date>2011-09-27T18:48:40Z</dc:date>
    </item>
    <item>
      <title>Date +1</title>
      <link>https://community.qlik.com/t5/QlikView/Date-1/m-p/294429#M1187106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The due files are linked by the customer number, loan number.&amp;nbsp; I have a concatenated field in the script that states that the due customer number+due loan number+(due date+1) equals the due.match1.&amp;nbsp; If due.match1=paid date then I want the paid transaction amount.&amp;nbsp; That field would be called - paid 1 day late because if something is due 9/12 but paid on 9/13 the due+1 field should give me 9/13 - right?&amp;nbsp; &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hm I don't really understand, how does your script line for this looks like?&lt;/P&gt;&lt;P&gt;If you concatenate a customer number and loan number and (due date+1) you are getting a date to compare with paid date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume your dates are correctly recognizes as Date type, so your calculated dimension returns correct dates for this month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point in not using a string in the else part of your if() function is, that you want get your string back if all or any records will lead to executing your else-statement, because of the sum (I believe you can't sum a string, It will return zero at best). If you need to verify that the else part is executed, you might change the then part to zero and use 1 for the else part as in&lt;/P&gt;&lt;P&gt;= sum(if(([Due.Due Date]+1)= Paid.TranDate and Paid.CustomerNbr=Due.CustomerNbr, 0,1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use this as first expression and the counter part&lt;/P&gt;&lt;P&gt;= sum(if(([Due.Due Date]+1)= Paid.TranDate and Paid.CustomerNbr=Due.CustomerNbr, 1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then the sum of both values should be equal to the number of records for that date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see anything really wrong with your expression but maybe I am missing something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using separate expressions for part of your total expression, like&lt;/P&gt;&lt;P&gt;= [Due.Due Date]&lt;/P&gt;&lt;P&gt;= [Due.Due Date]+1&lt;/P&gt;&lt;P&gt;= Paid.TranDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe there is an issue with your date comparison, try also putting date around both parts:&lt;/P&gt;&lt;P&gt;= sum(if(date([Due.Due Date]+1)= date(Paid.TranDate) and Paid.CustomerNbr=Due.CustomerNbr, Paid.TranAmount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have still problems, maybe you could post a small app here in the forum which shows your problem (it doesnt need to use your original data if this is a problem). At best, it is self contained, i.e. it is possible to reload (no need for further files, e.g. by using INLINE LOADs). Upload is available from the advanced editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps a little,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 18:42:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-1/m-p/294429#M1187106</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-28T18:42:17Z</dc:date>
    </item>
  </channel>
</rss>

