I have a if statement that is to look at a number and if the number is above 15 to show the words delayed if it is under 15 or a negative value should display not delayed.
At present it is only displying not delayed for every result. going forward I want to be able to calculate the total amount of delayed and not delayed by day week month and year.
i have attahced a sample of my data where you can see the issue
Solved! Go to Solution.
I may be misunderstanding your requirement but it looks to me that you need some sort of aggregation in your expression (sum, avg, max etc) otherwise you will return null and the comparison will fail hence only one value is returned.
I'm not sure why you are using the variable, but doesn't this work ...
I would probably use this instead though ...
Don't you think it's a problem related to the definition of you variable DELAYMINS ?
If you try DELAYMINS = Minute(Frac(SCH)-Frac(CHKS)) ??
Hope that will help.
First I think your expression was not rightly writen :
Minute(Frac(Timestamp1)-Frac(Timestamp2)) --> Minute(Frac(Timesstamp1)-Frac(Timestamp2))
And after I don't really see the point of puting SCH and CHKS into variables.
But I just had a quick look and I'm not sure it works according to your needs.