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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
demcug82
Contributor III
Contributor III

Wildmatch on combo chart (Filter multiple selection)

Hi All,

I have a Filter (COUNTRY) where i can select USA, Canada, Mexico  e.g.

In an expression of combo chart, if i have selected USA or USA and Canada or USA and Mexico or USA , Mexico and Canada, or anything i have to use Expression A otherwise Expression B using (IF)

I Create this:

if(

wildmatch(concat(COUNTRY,''),'*USA*'),

sum(X),

sum(Y)

)

but works only if I do not select anything (sum X)  or if not select USA (sum Y).


When i select USA use sum Y.


If i insert this expression on a label works perfectly.


I have tried also substringcount(concat(COUNTRY),'USA')=1 but don't works.


Any Idea?

Thanks and Regads,

Demetrio

Labels (1)
12 Replies
demcug82
Contributor III
Contributor III
Author

not yet... but

I have reversed the cases and now don't works only when mexico and canada are selected togheter.

perhaps.. with another if ....getcount..

if(

GetFieldSelections(F_ECONOMICS_NAFTA.COUNTRY_FILTER)='Canada' or GetFieldSelections(F_ECONOMICS_NAFTA.COUNTRY_FILTER)='Mexico',

sum({<F_ECONOMICS_NAFTA.DATA ={">=$(=DATE#((v_selected_period5)&'-01'))<=$(=DATE#((v_selected_period6)&'-01'))"}>}

F_ECONOMICS_NAFTA.AVERAGE_RATE_FF_MONTHLY),

sum({<

F_ECONOMICS_NAFTA.COUNTRY_FILTER=,

//F_ECONOMICS_NAFTA.COUNTRY={'Euro Area','Japan','UK',$(=v_country_exchange_rate_NAFTA)},

F_ECONOMICS_NAFTA.COUNTRY={$(=v_country_exchange_rate_NAFTA2),$(=v_country_exchange_rate_NAFTA)},

F_ECONOMICS_NAFTA.DATA ={">=$(=DATE#((v_selected_period5)&'-01'))<=$(=DATE#((v_selected_period6)&'-01'))"}>}

F_ECONOMICS_NAFTA.AVERAGE_RATE_FF_MONTHLY))

sunny_talwar
MVP
MVP

Not sure....unless you can share an example... it might be too difficult to suggest anything

demcug82
Contributor III
Contributor III
Author

Resolved

I have created a variable: =substringcount(concat(F_ECONOMICS_NAFTA.COUNTRY_FILTER),'USA') and inserted this on expression (>0)

Unless variable the chart don't works fine but with this it's ok!