Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Normalizing Dataset / Finding one field among many

I have some denormalized data, along the lines of the following:


FruitData:

LOAD * INLINE [
ID,ColumnA, ColumnB, ColumnC
1,'Apple','Pear','Banana'
2,'Banana','Mango','Strawberry'
3,'Pear','Strawberry','Kiwi'
]
;

LOAD * INLINE [
Fruitname
'Apple'
'Banana'
'Pear'
'Mango'
'Kiwi'
'Strawberry'
'Papaya'
]
;

And what I need to do is compare these fields to a master list of fruit (held in another table). This would mean that if I chose Banana, IDs 1 and 2 would come up and if I chose Strawberry, IDs 2 and 3 would come up.

Is there any way I can create a listbox that searches across all 3 fields at once?

Thanks in advance!

1 Solution

Accepted Solutions
MVP
MVP

Re: Normalizing Dataset / Finding one field among many

Easiest or one way to achieve this would be to transform your crosstable FruitData into a straight table:

FruitData:

CROSSTABLE (Column, Fruitname) LOAD * INLINE [
ID,ColumnA, ColumnB, ColumnC
1,'Apple','Pear','Banana'
2,'Banana','Mango','Strawberry'
3,'Pear','Strawberry','Kiwi'
]
;


LOAD * INLINE [
Fruitname
'Apple'
'Banana'
'Pear'
'Mango'
'Kiwi'
'Strawberry'
'Papaya'
]
;

1 Reply
MVP
MVP

Re: Normalizing Dataset / Finding one field among many

Easiest or one way to achieve this would be to transform your crosstable FruitData into a straight table:

FruitData:

CROSSTABLE (Column, Fruitname) LOAD * INLINE [
ID,ColumnA, ColumnB, ColumnC
1,'Apple','Pear','Banana'
2,'Banana','Mango','Strawberry'
3,'Pear','Strawberry','Kiwi'
]
;


LOAD * INLINE [
Fruitname
'Apple'
'Banana'
'Pear'
'Mango'
'Kiwi'
'Strawberry'
'Papaya'
]
;