Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to make optimization of expression in one application, right now it looks like this:
sum(aggr(if($(vFilter),sum([Estimated labor hours]),0), [Key]))
where vFilter is:
(len(trim(MaxString([Request Number])))>0
or
len(trim(MaxString([Agreement number])))>0)
and
(
(num(Left(PurgeChar(MaxString([TECO Date]),'-'),6))<=max(num([Year Month]))
and
num(Left(PurgeChar(MaxString([TECO Date]),'-'),6))>=min(num([Year Month])))
or
(num(Left(PurgeChar(MaxString([Invoice Date]),'-'),6))<=max(num([Year Month]))
and
num(Left(PurgeChar(MaxString([Invoice Date]),'-'),6))>=min(num([Year Month])))
)
Do you have any ideas?
Regards,
Vitalii
Hi, I suppose there will be a relation so each row of [Estimated labor hours] has related to one (or none) Request Number, agreement number, TECO date and Invoice date. If this is true, you can add a flag to each [Estimated labor hours] so youly need "Sum({<flag={1}>} [Estimated labor hours])
If this is not possible, at least try to add flags for the len(trim(...)) checks, and add fields in each estimated labor hours to have num(Left(PurgeChar(MaxString([TECO Date]),'-'),6)) as assigneTECODate, and the same with the other date to allow do the camparison with this precalcualted fields.