Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
siewmei_lsm
Contributor II
Contributor II

How to write set analysis for IF function?

I had set expression for IF function. How can i convert it to set analysis?

example:

If(ONTARGET_LATEST_SNAPSHOT='Y', sum(SALES_EOQ/2000), if(ONTARGET_LATEST_SNAPSHOT='N', sum(SALES_EOQ/1000)))

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Suggesting a correct set expression requires to know a minimum about your model, e.g. how the fields are linked or not linked, and the context of usage of your expression. I am missing both information in your posting.

Maybe just use

=

sum(SALES_EOQ)

/

Pick(Match(ONTARGET_LATEST_SNAPSHOT,'Y','N'), 2000,1000)

View solution in original post

3 Replies
sunny_talwar

May be this

Sum({<ONTARGET_LATEST_SNAPSHOT = {'Y'}>}SALES_EOQ/2000) +

Sum({<ONTARGET_LATEST_SNAPSHOT = {'N'}>}SALES_EOQ/1000)

Anonymous
Not applicable

sum({<ONTARGET_LATEST_SNAPSHOT="Y"}>SALES_EOQ)/2000

sum({<ONTARGET_LATEST_SNAPSHOT="N"}>SALES_EOQ)/1000

swuehl
MVP
MVP

Suggesting a correct set expression requires to know a minimum about your model, e.g. how the fields are linked or not linked, and the context of usage of your expression. I am missing both information in your posting.

Maybe just use

=

sum(SALES_EOQ)

/

Pick(Match(ONTARGET_LATEST_SNAPSHOT,'Y','N'), 2000,1000)