4 Replies Latest reply: May 8, 2017 9:42 AM by Vishwarath Nagaraju RSS

    Wildmatch function

    Ajinkya Bhonsle

      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.

        • Re: Wildmatch function
          Vishwarath Nagaraju

          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.

          • Re: Wildmatch function
            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.