Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a similar table
and i would like to have a similar result without using "if" expression (see the 4° column) like the 5° column (that obviously don't work)
some suggestions?
many thanks
Mauro
Or you can use
Pick(Match(F2, '/', '*'), F1/F3, F1*F3)
in the expression, which would replicate what you're trying to do!
If you can add it into your load:
Load Evaluate(F1 & F2 & F3) as Result,
* Inline [
F1, F2, F3
10, /, 5
20, *, 5
];
Would give you what you want.
Thanks,
but there is no possibility to make this evaluation on expression?
my example is simple, but in the production file the situation is more complex.
You could with an IF statement, but it may slow down your load.
IF(F2 = '/',F1/F3,
IF(F2 = '*', F1/F3))
Another option is to use the PICK function after you create an INLINE table with the ID of the operation you'd like to perform.
PICK(%PICKID, F1/F3,
F1*F3))
like i said in the first question,
"If" statement is not usable , the update of the table object is too slow and use so much RAM.
It's not possible without using an IF statement or a PICK statement. However, PICK will take a lot less ram up than the IF.
Create the Inline like:
PICKOp:
LOAD * INLINE [
%OpID, %Operation
1, F1 / F3
2, F1 * F3
];
Then
PICK(%OpID,
SUM(F1)/SUM(F3),
SUM(F1)*SUM(F3))
If you don't want to SUM, just do F1/F3, F1*F3
Or you can use
Pick(Match(F2, '/', '*'), F1/F3, F1*F3)
in the expression, which would replicate what you're trying to do!