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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
antupe
Contributor III
Contributor III

Set analysis and wildmatch error

I have the following formula in a text box:

Count(distinct{<CMPType={"*PERMANENT*"}, [OpenCampaing]={SI}>}Campaing)

This is to count the number of campaigns which are permanent campaigns (CMPType={"*PERMANENT*"}) and that are open (active). *PERMANENT* is used because PERMANENT is not a CMPType itself, but all of the campaigns that are permanent include the word permanent, eg 'QUALITY PERMANENT'

It works perfectly fine with all the selections like ID or date, except when I select a particular CMPType, where the total value appears.

Any ideas why? Thanks

Labels (1)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

Hi @antupe ,

You should use the below expression:

Count(distinct{<CMPType *= {"*PERMANENT*"}, [OpenCampaing]={SI}>}Campaing)

it enable you to select a specific *PERMANENT* CMPType value.

Best Regards

View solution in original post

4 Replies
Or
MVP
MVP

When you apply a specific selection to a field in set analysis, it will always be applied, even if it overrides the existing selection on that field. So, no matter what you select in the CMPType field, you will always view the *PERMANENT* values for that field in this formula.

antupe
Contributor III
Contributor III
Author

Thanks! I did not know that. So do you have any suggestion of how I could manage to count the number of permanent campaigns even if a CMPType selection is active?

agigliotti
Partner - Champion
Partner - Champion

Hi @antupe ,

You should use the below expression:

Count(distinct{<CMPType *= {"*PERMANENT*"}, [OpenCampaing]={SI}>}Campaing)

it enable you to select a specific *PERMANENT* CMPType value.

Best Regards

antupe
Contributor III
Contributor III
Author

This is working perfectly, thank you very much!!