Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Inline Stuff

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.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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

View solution in original post

3 Replies
Anonymous
Not applicable

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

rwunderlich
MVP
MVP

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

http://masterssummit.com

http://robwunderlich.com

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Elena! It works perfect, it just only needs to Iterno until 100 to complete the range.

Regards, Marcel.