I’ve calculated the difference between dates and now based on that calculation I want to assign a 1 or 0 in order to count. I used the following formulas but I’m getting an error. Any ideas??
And/Or logic to return 1 or 0
you are missing a “)”, first line after the “7”
try this:
var returnValue = 0;
if ( yada yada ) { returnValue =0; }
else if ( yada yada ) { returnValue = 1; }`
return returnValue;
btw I like the screen shoot to give big picture, next time please copy the expression and paste it as text so we can copy it and not have to type it, that why i did “yada yadas”
Thank you. The “)” fixed the syntax error, but now I’m getting a data retrieval failed error. Please see expression below, maybe I still was missing something.
var returnValue = 0;
if ($Days until Input$<0 || $Days until Input$>7) {returnValue = 0};
else if ($Days until Input$>=0 && $Days until Input$<=7) {returnValue = 1};
return returnValue;
I think I have had that before.
I fixed it by deleting all my $yada$ and re adding them. sometimes if you type it out the connection is not made you got to use the picker that comes up.
Thank you, I tried but still same error. Would it matter if the elements I’m using are dimensions instead of measures?
I think you need to contact support. as long as it shows up when you type the “$” it should work.
Are any of these have null possibles? you need to check for null if they can be null.