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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
slondono
Partner - Creator II
Partner - Creator II

How to get possible values from the script

Hi guys.

I have an excel with 2 fields, something like this:

Region      SubRegion

1                    10

1                     12

1                     8

2                    6

2                    2

3                    5

3                     20

I need a way from script, to get the subregions. I mean something like this

vRegion1 = "10,12,8"

Any idea?

Labels (1)
2 Replies
vikramv
Creator III
Creator III

Try this.....

===================

Tab1:

Load * Inline

[

Region,  SubRegion

1 ,      10

1 ,                    12

1 ,                    8

2  ,                  6

2  ,                  2

3  ,                  5

3   ,                  20

];

Tab2:

NoConcatenate

Load Region , Concat(SubRegion , ',') as vRegion1 Resident Tab1 Group by Region;

Drop Table Tab1;

sunny_talwar
MVP
MVP

May be something like this:


LOAD Region,

           Concat(Sub-Region, ', ') as ConcatList

Resident Table

Where Region = 1;


Let vRegion1 = Peek('ConcatList');