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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaushik2020
Creator III
Creator III

Line limit in a set expression

Dear all, I am writing a set expression with 35 set of conditions. and each condition has nested if. In desktop I am getting a limit to 1379 lines. 

Could you please suggest how I can write the expression ? 

thanks in advance.

3 Replies
Chanty4u
MVP
MVP

Best approach is 

Each set of expression keep it in one variable and use that variable in ur expression so that it will be easy to reduce your lengthy expression 

Sum({$< $(vCondition1), $(vCondition2) >} Sales)

 

Kaushik2020
Creator III
Creator III
Author

thanks for the revert, i tried with below approach to make it work. 

if(column(1)>=6,4,
if(column(1)>=2,3,
    if(column(1)>=-6,2,1)))
as there was an error while writing the condition from Column(1). Pls let me know if this is ideally suggested or not. 
 
Pls note, Column(1) has 876 line of code. So, when we are replicating with the above approach, we can write only 1379 lines.
marcus_sommer

I suggest to rethink the entire approach and transferring the essential logic into the data-model to ensure that each expression could be as simple as possible and comprehend within a glance.

Everything else becomes easily a nightmare - because how will you validate and troubleshoot or even maintain such monster ? - and it won't be save efforts or performance else the complete opposite will happens.