Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, I have some customer codes to group, and I have one question :
If I have the following inline where '*' means any possible number :
InlineGroups:
LOAD * INLINE [
CustomerCode,CustomerGroup
048**,Group1
049**,Group2
];
How could I expand it to get the following result?
CustomerCode, CustomerGroup
04800,Group1
...
04899,Group1
04900,Group2
...
04999,Group2
Any ideas about how to do this?
Regards, Marcel.
Hello, can you try this?
InlineGroups:
LOAD * INLINE [
CustomerCode,CustomerGroup
048**,Group1
049**,Group2
];
LOAD
num(SubField(CustomerCode, '*',1),'000') & num(IterNo()-1,'00') as CustomerCode,
CustomerGroup
Resident InlineGroups
While IterNo() <= 99
KR
Elena
Hello, can you try this?
InlineGroups:
LOAD * INLINE [
CustomerCode,CustomerGroup
048**,Group1
049**,Group2
];
LOAD
num(SubField(CustomerCode, '*',1),'000') & num(IterNo()-1,'00') as CustomerCode,
CustomerGroup
Resident InlineGroups
While IterNo() <= 99
KR
Elena
Here are a couple suggestions.
1. "Map" with wildcards instead of expanding the range. See
Qlikview Cookbook: Mapping With Wildcards http://qlikviewcookbook.com/recipes/download-info/mapping-with-wildcards/
2. Expand the range using a while loop. See attached for an example.
-Rob
Thanks Elena! It works perfect, it just only needs to Iterno until 100 to complete the range.
Regards, Marcel.