Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a input table with looks like the below.
| Plant | Transcation count |
|---|---|
| A | 2 |
| A;B | 10 |
| A;C;D | 12 |
| D | 5 |
| B | 8 |
| A;B;C;D | 17 |
| E | 1 |
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 | |
| Plant | Transcation count |
| A | 2 |
| A;B | 10 |
| A;C;D | 12 |
| A;B;C;D | 17 |
| Straight table On D Value selection | |
| Plant | Transcation count |
| A;C;D | 12 |
| D | 5 |
| A;B;C;D | 17 |
| Straight table On E Value selection | |
| E | 1 |
Please suggest
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

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

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;