Forum Discussion
Max(ToDays([Projected Launch Date] - Today()),0)
That way it will never go below zero.
But if you want null (blank) then it would be
var number Countdown = ToDays([Projected Launch Date] - Today());
IF($Countdown >0, $Countdown)
- ArchiveUser7 years agoQrew CaptainThanks - I'm really glad that I asked, since my solutions were not even close to what you have there (and also why they weren't working!). I do like the idea of the null, so I appreciate that suggestion, as well.
- ReneJamis111 months agoQrew Member
Greetings,
This post is the one I found would be most relevant.
I have a report containing fields [QName], [Overall End], and {Next Val Date] which is a report formula (Formula - Date) containing ToDate([Overall End]) + Days(90). This performs exactly as needed..
I tried adding a filter that would only show the records that were within 5 days of [Next Val Date] however, the criteria is a text field rather than allowing me to select a date 5 days before [Next Val Date].
I found this post and tried both suggestions but I don't have [Next Val date] to select from in the fields drop-down.
I used {Formula - Date/Date/Time/Numeric/Duration] but none showed [next Val Date] in the fields list.
What am I missing here??
------------------------------
Rene Jamis
------------------------------- ChayceDuncan11 months agoQrew Captain
Are you just trying to filter the report specifically when next value date within the next 5 days? The simplest solution to get around the quirkiness of using report-formulas as filters is to define a true/false value in the report formula itself. So instead of making a date field as the report formula, make it a formula checkbox.
In that checkbox - do something like:
field name: Filter
((ToDate([Overall End]) + Days(90) - Today()) <= Days(5)
That will give you a true false response. In your actual filters then - you can pick this report formula and your actual comparator will be equal to 1
In this case - since the report has a hard time identifying the schema of the report formula on fly - you're comparing the value of a checkbox to "1" / binary value of True.
------------------------------
Chayce Duncan
------------------------------