Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert if statement to Set Analysis

Can this be converted to Set Analysis?

if(SUM(EXTENDED_RETAIL) >=500, sum(EXTENDED_RETAIL)*.05, sum(EXTENDED_RETAIL)*.02  )



1 Solution

Accepted Solutions
MarcoWedel

no set expression, but maybe helpful:


SUM(EXTENDED_RETAIL)*(.05+(sum(EXTENDED_RETAIL)<500)*.03)


regards


Marco



View solution in original post

5 Replies
oknotsen
Master III
Master III

No, but you could use the statement in your script and create an extra field for the outcome so you no longer have to do the calculation in your front-end.

May you live in interesting times!
MarcoWedel

no set expression, but maybe helpful:


SUM(EXTENDED_RETAIL)*(.05+(sum(EXTENDED_RETAIL)<500)*.03)


regards


Marco



Not applicable
Author

Marco,

The " + " in the set equation represent the "OR" condition?

Lyndon

avinashelite

In your case your comparing the results after the Aggr so you need calculate the sun() in the script then you could use the same in set analysis

Not applicable
Author

It works!