Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I need to create an expression based on a field like: SUM({<fabs(FIELD) = {'20'}>} VALUE). Thats is, I need to sum VALUE where the absolute value of FIELD is equal to 20 (so, the FIELD = 20 and FIELD = -20 will be considered in the SUM). However I couldn't find a way to do without creating a second field in the script using the FABS function (I want to avoid creating it).
Thanks!!
How about this?
Sum({<FIELD = {'20', '-20'}>} VALUE)
or
Sum({<FIELD = {"=fabs(FIELD) = 20"}>} VALUE)
How about this?
Sum({<FIELD = {'20', '-20'}>} VALUE)
or
Sum({<FIELD = {"=fabs(FIELD) = 20"}>} VALUE)
Better to create the Flag in script
LOAD if(fabs(FIELD)=20,1) as Flag
....
FROM Table.qvd(qvd)
Now create the Expression
sum({<Flag={'1'}>} Value)
Replace QVD name with your actual QVD with Path
I think OP wants to avoid making changes to the script
Hi
try this
SUM({$<FIELD={'*20'}>} VALUE)
then you are correct