Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Long story short I created a pivot query in SQL for the below and now I'm looking for a way to group multiple values into a list box.
ID Address Apple Orange Banana
1 100 Y
2 200 Y
3 100 Y Y
4 500 Y
7 ETC...
I would like to create a listbox that has the pivot values, in this case Apple, Orange and Banana and if there is a Y in their column then filter on those results...
List box
Apple
Orange
Banana
Okay, fairly new at Qliview. I would create a Resident load of the data from the SQL pivot and Crosstable that data?
Something like this:
Pivot:
Load * Inline [ID,Address,Apple,Orange,Banana
1,100,N,N,Y
2,200,Y,Y,N
3,100,Y,Y,N
4,500,N,N,Y
];
CrossTable (Fuit,Data,2) load
ID,
Address,
if(Apple='Y',Apple) as Apple,
if(Orange='Y',Orange) as Orange,
if(Banana='Y',Banana) as Banana
resident Pivot;
DROP Table Pivot;
Has this answered your question? If so, can you please close this thread by marking one of the answers correct? It will help others find a (correct) answer to similar problems and lets other contributing members know that this requires no more attention.