Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Scripting Wildcard

I am looking for a scripting wildcard and I am sure there is a simple answer to this, but I have been searching the web to no avail.

I am creating a dimension Business unit based on the values in a derived dimension Divison

OPPGENERAL:

Directory;

QUALIFY *;

UNQUALIFY [Opportunity ID;

LOAD [Opportunity ID]

...

text(Sector&[Organization 3]&[Last Level Organization]&[Region]&[Last Level Region]) As Division   

FROM
,
    
IF (OPPGENERAL.Division = 'B-F-F-NorthUK' OR OPPGENERAL.Division = 'B-F-F-NorthUK-F','F UK',
    
IF (OPPGENERAL.Division = 'B-F-MULTNAT-NorthUK' OR OPPGENERAL.Division = 'B-F-MULTNAT-Not_assignedEMEA','Multinat'

...

     )))) AS [Business Unit]    

Resident OPPGENERAL;

The problem I have is with Multinat; the two scenarios I have included are examples of a number of permutation. The criteria only depends on the first three parts - 'B-F-MULTNAT- and after that it can be anything. Is there a wildcard I can use? I have tried 'B-F-MULTNAT-*’ and 'B-F-MULTNAT-%’ and neither seem to work.

Regards

Jason

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Jason,

If you only want to look for matches in one field to only one value, the LIKE should work as well

LOAD [...]

WHERE OPPGENERAL.Division LIKE 'B-F-MULTNAT-*';

But the WildMatch() should work fine as well

LOAD [...]

WHERE WildMatch(OPPGENERAL.Division, 'B-F-MULTNAT-*');

Hope that helps.

Miguel

View solution in original post

4 Replies
Not applicable
Author

Hi Jason,

you can try to solve it with wildmatch function in where condition, something like wildmatch(OPPGENERAL.Division,

'B-F-MULTNAT-*’) .

regards

Not applicable
Author

Hi Krunoslav,

I have already tried

'B-F-MULTNAT-*’ and 'B-F-MULTNAT-%’ and neither seem to work.

Cheers

Jason

Miguel_Angel_Baeyens

Hi Jason,

If you only want to look for matches in one field to only one value, the LIKE should work as well

LOAD [...]

WHERE OPPGENERAL.Division LIKE 'B-F-MULTNAT-*';

But the WildMatch() should work fine as well

LOAD [...]

WHERE WildMatch(OPPGENERAL.Division, 'B-F-MULTNAT-*');

Hope that helps.

Miguel

Not applicable
Author

Miguel,

I kept it simple and used the Like and it worked well.

Thanks

Jason