Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

Set Analysis syntax error

Hi All,

I am getting syntax error and also not getting sum of quantity for that expression.

PFA...

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try formatting the timestamps similar to the date field like:

=sum({<[Expiration Date]={"<=$(=timestamp(today(),'MM/DD/YYYY hh:mm:mm TT')) >01/01/1753 00:00:00 PM"}>} [Remaining Quantity])

View solution in original post

8 Replies
tresesco
MVP
MVP

What would be the date condition, could you explain in words?

prma7799
Master III
Master III
Author

I have written this code

=sum({<[Expiration Date]={"<=$(=today())>01/01/1753"} [Remaining Quantity])

but i am not getting sum qty less than today date and i dont want to consider  QTY for 01/01/1753 date

chinnuchinni
Creator III
Creator III

try with this:

=sum({<[Expiration Date]= {'>$(=date(01/01/1753,'DD/MM/YYYY'))<=$(=max([Expiration Date]))'}>}[Remaining Quantity])

tresesco
MVP
MVP

Try formatting the timestamps similar to the date field like:

=sum({<[Expiration Date]={"<=$(=timestamp(today(),'MM/DD/YYYY hh:mm:mm TT')) >01/01/1753 00:00:00 PM"}>} [Remaining Quantity])

prma7799
Master III
Master III
Author

Hi tresesco

when i using you expression in my production application then it is coming 0 value

i have used this

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

tresesco
MVP
MVP

How do the values in [Expiration Date] field look like in prod?

prma7799
Master III
Master III
Author

When i use below then it is working fine

=sum({<[Expiration Date]={"<=$(=timestamp(today(),'DD/MM/YYYY hh:mm:mm')) >01/01/1753 00:00:00 PM"}>} RemainingQuantity)

Expiration Date look like below

ex date.png

tresesco
MVP
MVP

The field format and the comparison parameters have to match. You should also, remove 'PM' from the last value part.