Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
madhuqliklondon
Creator II
Creator II

Match function

I am trying to using match function in the following expression, please suggest the correct way of using it. I using the following but there is error in expression in drill down group.


IF([CountryRegion.Region]='China','China'
IF(
[CountryRegion.Region]='Norway','Norway'
If(Match(
[CountryRegion.Region]='Sweden', 'Denmark' , 'Finland','EU'
IF(
[CountryRegion.Region]='France','France' ))))

Thank you

1 Solution

Accepted Solutions
sudeepkm
Specialist III
Specialist III

IF([CountryRegion.Region]='China','China',
IF(
[CountryRegion.Region]='Norway','Norway',
If(Match([CountryRegion.Region],'Sweden', 'Denmark' , 'Finland'),'EU',
IF(
[CountryRegion.Region]='France','France' ))))

if your requirement is to replace the existing value of a field with a new value then you can manage that at script level by using mapping load and applymap function.

Create a map table using mapping load that will have two fields From, To.

and then call applymap function by passing the current value and get the new values as a new field.

View solution in original post

4 Replies
its_anandrjs

Try these ways

IF([CountryRegion.Region]='China','China',

IF([CountryRegion.Region]='Norway','Norway',

If( Match ( [CountryRegion.Region],'Sweden', 'Denmark') , 'Finland',

IF([CountryRegion.Region]='France','France','EU'))))

hari8088
Creator
Creator

Try this....

IF([CountryRegion.Region]='China','China'
IF(
[CountryRegion.Region]='Norway','Norway'
If(Match(
[CountryRegion.Region]='Sweden', 'Denmark' , 'Finland'),'EU'
IF(
[CountryRegion.Region]='France','France' )))

sudeepkm
Specialist III
Specialist III

IF([CountryRegion.Region]='China','China',
IF(
[CountryRegion.Region]='Norway','Norway',
If(Match([CountryRegion.Region],'Sweden', 'Denmark' , 'Finland'),'EU',
IF(
[CountryRegion.Region]='France','France' ))))

if your requirement is to replace the existing value of a field with a new value then you can manage that at script level by using mapping load and applymap function.

Create a map table using mapping load that will have two fields From, To.

and then call applymap function by passing the current value and get the new values as a new field.

its_anandrjs

Earlier was typo and saved try this one

IF([CountryRegion.Region]='China','China',

IF([CountryRegion.Region]='Norway','Norway',

If( Match ( [CountryRegion.Region],'Sweden', 'Denmark','EU')  = 1, 'Finland',

IF([CountryRegion.Region]='France','France'))))