Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Dimension called ProjectCodes with the following codes for example
ISPC0003
ISPC006
SODC0987
ERTD9865
ISKD987
ISKO9345
ISPI8745
ISPI294
SODG646
GRTE7646
DHIJ8736
ISCOME7635
I would like to create a flag or a new dimension using all codes which start with ISPC and ISPI so that I would be able to filter the data. Any suggestions on how to go about that would be appreciated.
Try this:
ab:
load *,
if(WildMatch(MyData,'*IS*'),'IS','NonIS') as flag ;
load * Inline [
MyData
ISPC0003
ISPC006
SODC0987
ERTD9865
ISKD987
ISKO9345
ISPI8745
ISPI294
SODG646
GRTE7646
DHIJ8736
ISCOME7635
];
exit SCRIPT;
Hi @Pomna
If you want start with ISPC & ISPI , then try like below
Load *, if(wildmatch(ProjectCodes , 'ISPC*', 'ISPI*'), 1, 0) as Flag from yoursource;
it will gives only the project code start with aboves.
Thanks for your response. I tried your suggestion and used the following set expression to retrieve the data
count({<Project Flag={1}>} Project Code)
I get only numbers but what I need is a list of all codes that start wit h ISPC and ISPI