Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

Who to write expression in optimize way

Hello All,

I have written a expression with plenty of IF conditions in it and  it is doing the purpose,   but when I look it I personal feel that it can be written in more optimize way 

Kindly suggest me how can I write the below expression in more optimize way instead of IF conditions 

 

if(SubStringCount([Measure for Filter],'ABSRPT'),
if('$(vComparison)'='8', sum([Impact]),
if(vComparison=1,
if(Num(sum([ABSRPT]), '#,##0.##', '.' , ',' )=Num($(vThresholdValue), '#,##0.##', '.' , ',' ),sum([Impact])),

if(vComparison=2,
if(sum([ABSRPT])<>$(vThresholdValue),sum([Impact])),

if(vComparison=3,
if(sum([ABSRPT])>$(vThresholdValue),sum([Impact])),

if(vComparison=4,
if(sum([ABSRPT])>=$(vThresholdValue),sum([Impact])),

if(vComparison=5,
if(sum([ABSRPT])<$(vThresholdValue),sum([Impact])),

if(vComparison=6,
if(sum([ABSRPT])<=$(vThresholdValue),sum([Impact]))

)))))))

 

Note: Copying only a piece of lines from my 143 line expression hoping that if i fix this i can fix the rest tooo

 

Thanks

 

 

 

1 Reply
kunkumnaveen
Specialist
Specialist
Author

Any suggestion Plz how can I write the above expression in a optimize way I mean with less IF conditions