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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
americanetsMD
Contributor III
Contributor III

Interval Match

Hello everyone,

I have a new task and in order to achieve my goal i have to add all Kontos to the Groups, based on specific Intervals.

With this said, i will now show you what tables i have, and where i need to get.:

I have the following Tables:

SetTab:

Load

KontoFrom,

KontoTo,

SetName

Resident SetSource;

 

KontoTab:

Load

Konto

Resident KontoSource;

In the SetTab  i have following data (Example):

KontoFrom | KontoTo | SetName

00100            | 00199      | Set1

00200            | 00299      |  Set2

00100            | 00299      | Set3

In the kontoTab i have following data (Example):

Konto

00101

00120

00201

00222

Now, what i need is to assign each Konto to the Set (SetName) based on the Intervals (KontoFrom / KontoTo)

I have to get something like:

SetName | Konto

Set1           | 00101

Set1           | 00120

Set2           | 00201

Set2           | 00222

Set3           | 00101

Set3           | 00120

Set3           | 00201

Set3           | 00222

I have already tried the Interval Matching but i get an all to all connection... 😞

I will be really thankful when someone can suggest how can i achieve this result.

 

 

Labels (1)
1 Solution

Accepted Solutions
PrashantSangle

Try below

Script

SetTab:
Load Num(KontoFrom) as KontoFrom, Num(KontoTo) as KontoTo,SetName Inline [
KontoFrom,KontoTo,SetName
00100,00199,Set1
00200,00299,Set2
00100,00299,Set3
];
 
NoConcatenate
SetFinal:
Load *,
KontoFrom + IterNo() - 1 as newTo
Resident SetTab
while KontoFrom + IterNo() - 1 <= KontoTo;
 
 
KontoTab:
Load Num(Konto) as newTo,'kontoTab' as flag Inline [
Konto
00101
00120
00201
00222
];
 
drop Table SetTab;

Visualization

PrashantSangle_0-1698240272702.png

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

2 Replies
PrashantSangle

Try below

Script

SetTab:
Load Num(KontoFrom) as KontoFrom, Num(KontoTo) as KontoTo,SetName Inline [
KontoFrom,KontoTo,SetName
00100,00199,Set1
00200,00299,Set2
00100,00299,Set3
];
 
NoConcatenate
SetFinal:
Load *,
KontoFrom + IterNo() - 1 as newTo
Resident SetTab
while KontoFrom + IterNo() - 1 <= KontoTo;
 
 
KontoTab:
Load Num(Konto) as newTo,'kontoTab' as flag Inline [
Konto
00101
00120
00201
00222
];
 
drop Table SetTab;

Visualization

PrashantSangle_0-1698240272702.png

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
americanetsMD
Contributor III
Contributor III
Author

Hi PrashantSangle,

Thank you very much for your help. I have got it done. 🙂