Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi Jason,
you can try to solve it with wildmatch function in where condition, something like wildmatch(OPPGENERAL.Division,
'B-F-MULTNAT-*’) .
regards
Hi Krunoslav,
I have already tried
'B-F-MULTNAT-*’ and 'B-F-MULTNAT-%’ and neither seem to work.
Cheers
Jason
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
Miguel,
I kept it simple and used the Like and it worked well.
Thanks
Jason