Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

optimization

in Qlikview development practices showed (a/b)-1 has better performance than (a-1)/b. why for these two equations equal number of operations are perform but it says (a/b)-1 was better. suggest me what is the reason

1 Reply
swuehl
MVP
MVP

I guess your second expression should be (a-b)/b

If a and b are complex expressions themselves, like aggregations,

the first expression (a/b)-1 only calculates two of these aggregations, while the second expression (a-b)/b calculates three (assuming no caching of b expression result involved, which is the case for Qlik AFAIK).