Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kwl1234
Partner - Contributor III
Partner - Contributor III

Is there a better way to implement pick wildmatch?

expression:

Pick(wildmatch(Company),'A', 'B', 'C'),

 Sum({Company = 'A'} Sales),

 Sum({Company = 'B'} Sales),

 Sum({Company = 'C'} Sales)

)

but I don't want to copy the formula 3 times and replace the filter Company = 'A', Company = 'B'......

Is there any better way to implement the expression above?

Can Qlik possible save the formula on variable and call back the variable on expression?

 

3 Replies
tresesco
MVP
MVP

In wildmatch() you have to include wildcard characters, like'*' - that is missing in your example.

It seems to be a unnecessary complexity in expression. If you have Company as dimension, you could simply use Sum(Sales) as expression. It does the same thing.

kwl1234
Partner - Contributor III
Partner - Contributor III
Author

Hi tresesco,

 

The Actual formula is quite complex and 

I really want make filter criteria dynamic on expression  instead of using pick and match function. But I cannot find a way to do this.

bramkn
Partner - Specialist
Partner - Specialist

Please post the formula then. As the example given is too simple to give any good advice on this.