Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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))
Not sure....unless you can share an example... it might be too difficult to suggest anything
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!