Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Vidit
Creator
Creator

How to get the desired output?

Hi,

I have a input table with looks like the below.

 

PlantTranscation count
A2
A;B10
A;C;D12
D5
B8
A;B;C;D17
E1

On the dashboard, i need to have a list box(Plant)

Plant List Box
A
B
C
D
E

and a straightt table. Such that

  

  Output tables

Straight table On A Value selection
PlantTranscation count
A2
A;B10
A;C;D12
A;B;C;D17

 

Straight table On D Value selection
PlantTranscation count
A;C;D12
D5
A;B;C;D17

 

Straight table On E Value selection
E1

Please suggest

1 Solution

Accepted Solutions
maxgro
MVP
MVP

a:

load * inline [

Plant, Transcation count

A, 2

A;B, 10

A;C;D, 12

D, 5

B ,8

A;B;C;D, 17

E, 1

];

b:

load subfield(Plant, ';') as PlantListbox, Plant resident a;

then add the PlantListbox listbox

1.png

View solution in original post

2 Replies
maxgro
MVP
MVP

a:

load * inline [

Plant, Transcation count

A, 2

A;B, 10

A;C;D, 12

D, 5

B ,8

A;B;C;D, 17

E, 1

];

b:

load subfield(Plant, ';') as PlantListbox, Plant resident a;

then add the PlantListbox listbox

1.png

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this

PlantGroup:

LOAD * Inline [

Plant,    Transcation count

A,    2

A;B;,    10

A;C;D,    12

D,    5

B,    8

A;B;C;D,    17

E,    1

];

PlantTable:

LOAD

SubField(Plant,';') AS PLANT

Resident PlantGroup;

LET NumOfGroups= NoOfRows('PlantTable');

FOR i=0 to $(NumOfGroups)-1

LET GroupVariable=peek('PLANT',$(i),'PlantTable');

PlantGrouping:

LOAD

Plant,

'$(GroupVariable)' as GroupPlant

Resident PlantGroup

where SubStringCount(Plant,'$(GroupVariable)')>0

;

Next

drop Table PlantTable;