Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! We are currently optimizing Qlik Performance and I read one best practice where I need to use range functions instead of the usual num(sum), num (count) function. I found limited examples online for range functions on the front end.
If I have the ff. as my expression:
(num(count(distinct {<[FIELD1] = {'Yes'}>}[ID FIELD]),vFormatCount0) / num(count(distinct {<[FIELD2] = {'wrapup'}>}[FIELD ID]),vFormatCount0)) * 100
How do I change the expression to one using Range function?
Also, does this help with the overall UI Calculation/Qlik Optimisation?
Thank you!
Numsum() and Num(Sum(.... are NOT same. Similarly for count().
Numsum() is one function and Num(Sum(.. is combination of two functions.
Hi,
Please see below screenshot.
Numsum() and Num(Sum(.... are NOT same. Similarly for count().
Numsum() is one function and Num(Sum(.. is combination of two functions.
I agree with Tresesco that the range-functions couldn't replace the aggregations like sum() or count() because they work in a different direction - sum/count will aggregate the items (fieldvalues within a column) vertically and the range-functions do the calculation horizontally like: rangesum(Field1, Field2, ...).
Beside this you could optimize your expression if leave the num() because the result of num() / num() will be again unformatted. Further you could replace your string conditions within the set analysis with a numeric value - this means something like 'Yes' or 'No' with 1 or 0.
But usually you won't notice a significantly performance improvement through these kind of measures - by really large datasets and many objects on the sheet it might be different.
- Marcus