Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Connect 2025! Where innovative solutions turn your data visions into reality: REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression consolidation

Can the following two expressions be combined into one expression:

Screen Shot 2016-02-04 at 07.40.20.png

Thanking you in advance

Regards.

11 Replies
Anonymous
Not applicable
Author

Try this?

if(len(trim([Doctor Number])) = 0 or IsNull([Doctor Number]), '00000',

if(len(trim([Doctor Number])) >= 7 and [Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) as [Doctor Number]

Anonymous
Not applicable
Author

With Isnull() , you dont required to write If() again...

It should be like this

if(len(trim([Doctor Number])) = 0 or IsNull([Doctor Number]),