Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sathish_kumar
Contributor II
Contributor II

Optimize expression

Hello Users,

Is there any way to optimize the below sum if /set analysis expression

The below expression works well in charts... need to replace with an optimized expression which consumes less RAM .

Is there any way you can fine tune below expression?

sum({<Date*={">$(vStart)<$(vEnd)"}>}Sales* if((1-(fabs(Sales-Estimate))/Sales)<0,0,(1-(fabs(Sales-Estimate))/Sales)))/sum({<Date*={">$(vStart)<$(vEnd)"}>} Sales)

 

I dont want to do it in scripts... so prefer it in expressions. So can someone help me with this...

@sunny_talwar 

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum({<Date*={">$(vStart)<$(vEnd)"}>}Sales * RangeMax((1-(fabs(Sales-Estimate))/Sales), 0))
/
Sum({<Date*={">$(vStart)<$(vEnd)"}>} Sales)

View solution in original post

1 Reply
sunny_talwar

May be this

Sum({<Date*={">$(vStart)<$(vEnd)"}>}Sales * RangeMax((1-(fabs(Sales-Estimate))/Sales), 0))
/
Sum({<Date*={">$(vStart)<$(vEnd)"}>} Sales)