Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have following script to calculate the Days_left
num(makedate(2014,8,31))>0, num(POL_PERIOD_TO)- num(makedate(2014,8,31)),0) as DAYS_LEFT
The resulting table is as follows and Total of Days_Left sum to 636 where as Actual number of Days_left is 212
How can I restrict the No of Days_left appear as 212 (modification to Script)
POLICY_NO | POL_PERIOD_FROM | POL_PERIOD_TO | RISK_DATE | DAYS_LEFT |
NC52 | 31-Mar-2014 | 31-Mar-2015 | 31-Mar-2014 | 212 |
NC52 | 31-Mar-2014 | 31-Mar-2015 | 12-Aug-2014 | 212 |
NC52 | 31-Mar-2014 | 31-Mar-2015 | 11-Aug-2014 | 212 |
Total | 636 |
If I understand your question, you want to show 212 in the resulting table instead of 636.
In that case you can just change the Total Mode to "max" on the Expressions tab of you table.
Hi,
Try Interval() to get the date difference
=Interval(POL_PERIOD_TO - makedate(2014,8,31), 'D')
OR
Num(POL_PERIOD_TO) - makedate(2014,8,31)
Hope this helps you.
Regards,
Jagan.