Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

wildcard search

CountryCodeCoutnry1
US01US
Uk01UK
Ind03West Ind
Ind02East Ind
Ind01India
Ind04India North

Hi, I need the countrycodes of India only in a chart.

Don't hard card the values

I need the suggestions from you guys and kindly share the sample app.

11 Replies
sushil353
Master II
Master II

Hi,

Try to write expression in dimension tab.

=if(CountryCode='Ind*',CountryCode,'')

also check the option for suppress null values.

HTH

sushil

MarcoWedel

Maybe you could share some more information as to your input data, expected result and the logic to calculate this result.

This might help to answer your questions.

Regards

Marco

PrashantSangle

Hi,

Use wildmatch()

like

=if(wildmatch(CountryCode,'*Ind*'),CountryCode)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Thanks for your quick response.

I have  a bit more to additions to the Question.

CountryCodeCoutnry1
US01US
Uk01UK
Ind03West Ind
Ind02East Ind
Ind01India
Ind04India North
US02East US
UK02UKWest
UK03MidUK
UAE1UAE

I need to get the result in a chart either pivot/table box in such a way that if I select on India all the CountryCode related India only should display and if  I select on US all US related CountryCode should display.

should display the related countrycodes


aveeeeeee7en
Specialist III
Specialist III

Use this:

=if(Left(CountryCodes,3)='IND' AND WildMatch(CountryCodes,'*IND*'),'INDIA',

if(Left(CountryCodes,2)='US' AND WildMatch(CountryCodes,'*US*'),'US',

if(Left(CountryCodes,2)='UK' AND WildMatch(CountryCodes,'*UK*'),'UK',CountryNames))) AS NewCountryName

Also, see the Attachment to see your new requirement of Pivot Table Country names Selection.

Regards

Av7eN

Anonymous
Not applicable
Author

Thnaks for the response

I don't want to hard code the values as Ind, us in the expresson

because I may have more columns as of now only 3 it can be done but I want the result in dynamically

anbu1984
Master III
Master III

Is it possible to add a field like below?

CountryCodeCoutnry1Country
Ind01IndiaIndia
Ind02East IndIndia
Ind03West IndIndia
Ind04India NorthIndia
UAE1UAEUAE
Uk01UKUK
UK02UKWestUK
UK03MidUKUK
US01USUS
US02East USUS
Anonymous
Not applicable
Author

Hi Abhu

thanks for the reply even that can be acceptable until unless we have hardcoded the values.

anbu1984
Master III
Master III

Check this app