Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikview User
I was wondering if anyone was able to give me any guidance as to what expression is going to be more efficient?
Option 1: Set Analysis with an If statement inside
=Sum({<data_source={"$(=if(_view_HSMR='SMR - All','SMR','HSMR'))"},Care_Group,HSMR.Diagnosis_Group-={'ALL'}>}HSMR.Spells)
Option2: A pick match with set analysis
=Pick(Match(_view_HSMR,'SMR - All','HSMR - 56 Diagnosis Groups'),
Sum({<data_source={'SMR'},Care_Group=, Treatment_Function=,HSMR.Diagnosis_Group-={'ALL'}>}HSMR.Spells),
Sum({<data_source={'HSMR'},Care_Group=, Treatment_Function=,HSMR.Diagnosis_Group-={'ALL'}>}HSMR.Spells))
Any help or guidance would be great, so we can adopt a blanket approach to other expressions
Kind Regards
Helen
create a flag in script for if condition and use that flag in first set expression it will give more performance i believe
(=if(_view_HSMR='SMR - All','SMR','HSMR'
Efficiency is quite situational - the best way is to test both expressions. If you put them in separate tables, you can use the calculation time in Document Properties | Sheets to evaluate the performance.
I would expect that if the cardinality of _view_HSMR is low (2 possible values?) then the performance impact on option1 will be small.
What is your dimension?