Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all
I am having trouble with an expression.
In my model I have a field INCIDENTOPENINGDATE which contains '2019/01/01' - it is a true date field (if I change the display format to Integer, it gives me a true date value - etc 43191)
In my expression I want to display everything that is LESS or EQUAL TO a variable - the variable is called vPrevDate and contains '2019/11/11'
My Expression currently is this...
=count({<INCIDENTOPENINGDATE ={"$(='$(vPrevDate)')"}>}distinct INC_INCIDENT_ID) and it works fine for = to, but NOT less than (obviously)
How do I change my expression to do the LESS than as well?
Unfortunately I cannot post a copy of the model, it is work related.
Thanks
The script with dummy data:
SET DateFormat='YYYY/MM/DD';
SET vPrevDate = '2019/11/15';
tmp:
LOAD Chr( Floor(rand() * 26) + 65) as INC_INCIDENT_ID,
Date(today() + rowno()) as INCIDENTOPENINGDATE
AutoGenerate 1000;
The xpression:
=Count({<INCIDENTOPENINGDATE = {"<=$(vPrevDate)"}>}DISTINCT INC_INCIDENT_ID)
And the result in the picture:
Try this:
count({<INCIDENTOPENINGDATE ={"<=$(='$(vPrevDate)')"}>}distinct INC_INCIDENT_ID) and it works fine for = to, but NOT less than (obviously)
It returns this...(see Attachment)
You have a sample app?
The script with dummy data:
SET DateFormat='YYYY/MM/DD';
SET vPrevDate = '2019/11/15';
tmp:
LOAD Chr( Floor(rand() * 26) + 65) as INC_INCIDENT_ID,
Date(today() + rowno()) as INCIDENTOPENINGDATE
AutoGenerate 1000;
The xpression:
=Count({<INCIDENTOPENINGDATE = {"<=$(vPrevDate)"}>}DISTINCT INC_INCIDENT_ID)
And the result in the picture: