Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gr_eldred
Creator II
Creator II

Wildmatch()

Good afternoon I have an error with the use of this Wildmatch when reloading data tells me that the syntax is incorrect is it possible to do this? What could be another option?

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad)

20 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

I believe you're missing the ending "if" parenthesis, like this:

if

(

WildMatch

(

ApplyMap('Map_Clasific_art', %Art_ID,'N/A'),

'Iphone'

)

and

WildMatch

(

ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'),

'iPhone 6',

'iPhone 6 Plus',

'iPhone 6S',

'iPhone 6S Plus',

'iPhone 7',

'iPhone 7 Plus',

'iPhone SE'

) ,

sum(Cantidad)

) // This one is missing


Felipe.

sunny_talwar

Check this

If(WildMatch(ApplyMap('Map_Clasific_art', %Art_ID, 'N/A'), 'Iphone') and WildMatch(ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE'), Sum(Cantidad), 0) as YourFieldName

Also, I hope you are using Group By clause since you have Sum() in your load

gr_eldred
Creator II
Creator II
Author

sorry sorry The expression I am using is this.

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota

gr_eldred
Creator II
Creator II
Author

sorry sorry The expression I am using is this.

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota

gr_eldred
Creator II
Creator II
Author

Tells me that I have a syntax error but only when I add this wildmatch that is bold

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota

gr_eldred
Creator II
Creator II
Author

Tells me that I have a syntax error but only when I add this wildmatch that is bold

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota

its_anandrjs

Another way for doing this is but question is will this is expression or the field you can use it on both ways

Expression:-

=Sum( if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and

          WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE'),  Cantidad ))


By Field:-

Load

...

...

Sum( if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and

          WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE'),  Cantidad )) as FieldNameHere

From Source

Group By ....;



gr_eldred
Creator II
Creator II
Author

Tells me that I have a syntax error but only when I add this wildmatch that is bold

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota

gr_eldred
Creator II
Creator II
Author

I have more code below all this is considered I need help with what is in bold

if( WildMatch( ApplyMap('Map_Clasific_art', %Art_ID,'N/A'), 'Iphone' ) and WildMatch( ApplyMap('Map_Subclasific_art', %Art_ID,'N/A'), 'iPhone 6', 'iPhone 6 Plus', 'iPhone 6S', 'iPhone 6S Plus', 'iPhone 7', 'iPhone 7 Plus', 'iPhone SE') , sum(Cantidad) ,0) as cuota


Since adding the Wildmatch and mark me error as if it was not allowed