Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
How to concat Field Names , based on binomial values and Save output in qvd .
Output Needed in QVD , should be something like this ;
Thanks & Regards
Shekar
Try like:
Binomial_Table:
Crosstable LOAD * INLINE [
Roll_ID, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10
R001A1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1
R001A2, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0
R001A3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1
R001A4, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0
R001A5, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0
R001A6, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1
R001A7, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1
R001A8, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1
R001A9, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1
R001A10, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0
R001A11, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1
R001A12, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0
R001A13, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1
R001A14, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1
R001A15, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1
R001A16, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1
];
Final:
Load
Roll_ID,
Concat( DISTINCT if (Value=1, Type), ',') as Blue,
Concat( DISTINCT if (Value=0, Type), ',') as Red
Resident Binomial_Table Group By Roll_ID;
Store Final into Final.qvd(qvd);
1 's are blue and 0 's are red?
Hi Tresesco ,
Yes , you are correct .
Try like:
Binomial_Table:
Crosstable LOAD * INLINE [
Roll_ID, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10
R001A1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1
R001A2, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0
R001A3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1
R001A4, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0
R001A5, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0
R001A6, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1
R001A7, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1
R001A8, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1
R001A9, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1
R001A10, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0
R001A11, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1
R001A12, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0
R001A13, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1
R001A14, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1
R001A15, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1
R001A16, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1
];
Final:
Load
Roll_ID,
Concat( DISTINCT if (Value=1, Type), ',') as Blue,
Concat( DISTINCT if (Value=0, Type), ',') as Red
Resident Binomial_Table Group By Roll_ID;
Store Final into Final.qvd(qvd);
Got it , Thank You Tresesco .