Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Pick or Match in chart functions- Qlik Sense

Hi All,

I have been using nested if statements in my chart functions. Can any body pleases help me any optimized way e.g. if I want to convert it using pick/match how the script would be transformed then. Thanks

E.g. Given the script

if(ValueList('Additional Testing,'Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',
'Medication Recommendation', 'More Info Needed' )  = 'Additional Testing', count([Additional Testing])/
count(total [Additional Testing]),

if(ValueList('Additional Testing,'Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',

'Medication Recommendation', 'More Info Needed' ) = 'Advice on Pathways',
count([Advice on Pathways])/count(total [ Advice on Pathways])

AND SO ON....

Please Help. Thanks

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Pick(Match(ValueList('Additional Testing,'Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',

'Medication Recommendation', 'More Info Needed' ) , 'Additional Testing','Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',Medication Recommendation', 'More Info Needed'),

count([Additional Testing])/ount(total [Additional Testing]),count([Advice on Pathways])/count(total [ Advice on Pathways]),............)

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Can you attach example qvf or qvw file.

Not applicable
Author

I will try. But if you could guide me to convert this lengthy repeated nested if statement to some other way like pick/ match. I have custom dimension and to for each value of dimension using if/value list I have to calculate my measure. I

antoniotiman
Master III
Master III

Pick(Match(ValueList('Additional Testing,'Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',

'Medication Recommendation', 'More Info Needed' ) , 'Additional Testing','Advice on  Pathways', 'Advice Provided', 'Advice Provided Description',Medication Recommendation', 'More Info Needed'),

count([Additional Testing])/ount(total [Additional Testing]),count([Advice on Pathways])/count(total [ Advice on Pathways]),............)

Not applicable
Author

very helpful. Many Thanks