Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a Dimension Country . I want to create two Flag says Bigcountry and Small Country . I have around 30 country and I want to have some work on specific country . Italy,France,Spain, United Kingdom as grouped as Big country and say A, B, C, d, E grouped as small country. I want to develop it in scripts. I tried below script.
If(Match('Country','Italy','France','Spain','United Kingdom'),'BigCountry''Country') as BigCountry,
If(Match('A','B','C,'d','e'),' small Country''Country') as SmallCountry,
But it is giving error. Please suggest.
Regards,
Niha
Hi Niha,
You probably want to achieve this:
If(WildMatch(Country,'Italy','France','Spain','United Kingdom'),'BigCountry', If(WildMatch(Country,'A','B','C,'d','e'),' small Country', 'Not Specified')) as CountrySize
Perhaps you missed comma (,)
If(Match('Country','Italy','France','Spain','United Kingdom'),'BigCountry', 'Country') as BigCountry,
If(Match('A','B','C,'d','e'),' small Country', 'Country') as SmallCountry,
Hello,
Thanks a lot ! after trying this code I got this. looks like some error in scripting. this is the code.
LOAD
Country,
If(Match('Country','Italy','France','Spain','United Kingdom'),'BigCountry', 'Country') as BigCountry,
If(Match('Egypt', 'Jordan', 'Lebanon' , 'Israel', 'Kuwait', 'Qatar'),'SmallCountry','Country') as SmallCountry,
"Full Name",
Position,
Area,
Hello,
Thanks. I want to group two separate groups from country. Say Country column has 32 country. I want to create two group say Big Country which has country Italy, France, UK. Another group which has say Israel, Arab, Jordan so on.
Regard,
Niha
My bad, This should be this?
LOAD
Country,
If(Match(Country,'Italy','France','Spain','United Kingdom'),'BigCountry', 'Country') as BigCountry, // Country is field name
If(Match(Country, 'Egypt', 'Jordan', 'Lebanon' , 'Israel', 'Kuwait', 'Qatar'),'SmallCountry','Country') as SmallCountry, // Country is field name
"Full Name",
Hello,
Thanks. I tried the code as suggested. I do see the values as Bigcountry, Country and also small country and country . I want the values as given in the match criteria like for Bigcountry I want Italy, France, Spain, UK, to be displayed.
If(Match(Country,'Italy','France','Spain','United Kingdom'),'BigCountry', 'Country') as BigCountry,
If(Match(Country, 'Egypt', 'Jordan', 'Lebanon' , 'Israel', 'Kuwait', 'Qatar'),'SmallCountry','Country') as SmallCountry,
If(wildMatch(Country,'Italy','France','Spain','United Kingdom'),'BigCountry') as BigCountry,
If(wildMatch(Country,'Egypt', 'Jordan', 'Lebanon' , 'Israel', 'Kuwait', 'Qatar'),'SmallCountry') as SmallCountry
dont use match it is case sensitive
try these 2