Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditions to Set Analysis

Hello Everyone,

I want to learn, how we can change the following if...else expression to a set analysis syntax.

sum(if(STAGE='Pending' AND CREATED_DATE<= Today() AND  REVENUE_RECOGNITION_FLAG<>'No' AND OPP_REG_ARCHIVE<>'False' AND IS_PART_ACTIVE=1 AND DESIGN_REG_STATUS<>'Rejected', TOTAL_VALUE))

I would be grateful if someone could please answer it please,

Thanking you beforehand,

Bikash

Labels (1)
2 Replies
erichshiino
Partner - Master
Partner - Master

Try this:

sum( {< STAGE={Pending}, CREATED_DATE= {"<= $( =Today())"},  REVENUE_RECOGNITION_FLAG-={No},  OPP_REG_ARCHIVE-={'False'} ,  IS_PART_ACTIVE={1}, DESIGN_REG_STATUS-={ Rejected} > }  TOTAL_VALUE)

I guess the only trick part may be the CREATED_DATE. If it doesn't work, you should created a numeric field on the script to achieve this

The syntax would be something like:

LOAD

CREATED_DATE,

NUM(CREATED_DATE) AS NCREATED_DATE

...  [ THE REST OF YOUR LOAD SCRIPT]

Then, on set analysis it would be:

sum( {< STAGE={Pending}, CREATED_DATE= {"<= $(=num(Today()))"},  REVENUE_RECOGNITION_FLAG-={No},  OPP_REG_ARCHIVE-={'False'} ,  IS_PART_ACTIVE={1}, DESIGN_REG_STATUS-={ Rejected} > }  TOTAL_VALUE)

Hope it helps,

Erich

Not applicable
Author

Thanks Erich, for your time.

I am giving a try to the code that you have suggested,

Regards,

Bikash