Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Wildmatch function

Hi All,

I am new to qliksense.Can anyone tell me what does the below codes do.

(1) If(WildMatch([Originating_Group__c], '*Sales*') = 0,'Marketing Campaign','Other') AS LM_CampaignFlag

(2)  If(WildMatch([Originating_Group__c], '*Sales*') = 0,1,0) AS LeadMarketingCampaignFlag,

(3)  If(WildMatch([Type], '*Call - Outbound*') = 0,0,1) AS LeadOutboundCallFlag,

(4) If(WildMatch([Type], '*Chat*','*Call*','*TeleMarketing*','*M2L*','*Inbound*','*Outbound*') = 0,'Eloqua Sourced','Other') AS LM_AQLFlag

Thank you.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be helpful

It creates 4 Field Names which match strings

1) If [Originating_Group__c] field has string called Sales then it will return Other because you are en-counting with only String is 0, If there is 0 Sales match it will return as 'Marketing Campaign'

2) It just work as first point only but this is very powerful, Due to it connect as 1 and 0. In future, if we need to show who else is not with Sales string then we need to show Sales

Sum({<LeadMarketingCampaignFlag = {1}>}Sales)

3) Same as Second part

4) Here, Also same with 1, ,2 & 3. But, Here they are calculating with 6 string names nothing new

P.S: I would suggest you to do the same in your machine then you came to know more understandable.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
vishsaggi
Champion III
Champion III

They all will create a Numeric and String flag fields in your data model for their respective field values.

From Qlikview help:

wildmatch( str, expr1 [ , expr2,...exprN ] )

The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.

Example:

wildmatch( M, 'ja*','fe?','mar')

returns 1 if M = January

returns 2 if M = fex

Wildmatch does a case insensitive search so * -> here represents any characters before or after the word "sales". Wildmatch returns an Integer value. If there is a string value sales in your Origination_Group__C field, it returns 1 which is not = 0, so it should return 'Other', if there is not match in that field it would return 'Marketing Campaign'. Are you sure the condition should be =0 or it should be > 0. I believe it should be > 0. So if there is any word sales in your Originating field it should give you Marketing Campaign.

Anonymous
Not applicable
Author

Thank you Vishwarath. Yes the condition should be = 0. So if I am reading it right for the last statement

If(WildMatch([Type], '*Chat*','*Call*','*TeleMarketing*','*M2L*','*Inbound*','*Outbound*') = 0,'Eloqua Sourced','Other') AS LM_AQLFlag

If the {Type] matches any of the *Chat*','*Call*','*TeleMarketing*','*M2L*','*Inbound*','*Outbound* it will return 1 which is not equal to 0 and hence all these values will be in the "Other" category.

And I also wanted to confirm the wildmatch returns a integer value right?

Anil_Babu_Samineni

May be helpful

It creates 4 Field Names which match strings

1) If [Originating_Group__c] field has string called Sales then it will return Other because you are en-counting with only String is 0, If there is 0 Sales match it will return as 'Marketing Campaign'

2) It just work as first point only but this is very powerful, Due to it connect as 1 and 0. In future, if we need to show who else is not with Sales string then we need to show Sales

Sum({<LeadMarketingCampaignFlag = {1}>}Sales)

3) Same as Second part

4) Here, Also same with 1, ,2 & 3. But, Here they are calculating with 6 string names nothing new

P.S: I would suggest you to do the same in your machine then you came to know more understandable.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

Yes, it returns and Int value.