Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi guys
i have a few formulas one of them look like - (sum(x)+avg(z))/sum(y)
I need to change the formula to a set analysis something like -
sum({<date={"<$(Max2)>$( Max1)"}>}+ avg({<date={"<$(Max2)>$( Max1)"}>}/
sum({<date={"<$(Max2)>$( Max1)"}>}
I managed to do it with the "replace()" func -
replace(String,'sum(','sum({<date={"<$(Max2)>$(Max1)"}>}')
But I need some kind of “replaceif” condition that will check if the string is ‘sum(‘ or ‘avg(’
if((string='sum(',
replace(string,'sum(','sum({<date={"<$(Max2)>$(Max1)"}>}'),
if((string)='Avg(',
replace(string,'Avg(','Avg({<date={"<$(Max2)>$(Max1)"}>}'),
any ideas?
THX
J
I've given an example in my previous reply.
Sorry i didn't see
Thanks a lot it worked perfect