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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if vs set

Hi, I have read in various threads that set should be faster and give better performance than if.

I have a case where I just need to say if FieldA = 'x value' then for instance multiply field B, field C and Field D.

It seems silly to make a set for all fields, so I would expect an if solution to be the choice?  

13 Replies
rajeshvaswani77
Specialist III
Specialist III

Hi Mikael,

It would be like this.

thanks,

Rajesh Vaswani

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

It's really difficult to understand the root cause of the issue, just one suggestion:

1. try break down your expression to elementary elements and show the in a table

2. add set analysis to each element and look whether they (a) calculated without errors and (b) satisfy your expectations

Best regards,

Maxim

Not applicable
Author

thx, yes the set version works but would it make sense in an if analysis?

Not applicable
Author

thx, and sorry I see it became a bit messi. I should have started with the set analysis and then ask how to make it with If analysis, as I just did in response to Rajesh.