Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

loop

hi !!

i have this table in the picture posted below and i want to add a new column where, for each row, appear only the name of the column that contain "1". What kind of string should i use to obtain this result??

Thx

PR1.JPG.jpg

2 Replies
kiranmanoharrode
Contributor III

Re: loop

hi Gabriele,

which object  u r using straight table ,Table box or pivot table for desired output?

MVP
MVP

Re: loop

Hi Gabriele,

basically, this is a Crosstable problem:

Data:

LOAD * INLINE [

    F1, a, c, d, f, g, b, e, h

    R1, 0, 0, 0, 0, 0, 0, 1, 0

    R2, 0, 0, 0, 0, 0, 1, 0, 0

    R3, 0, 0, 0, 0, 0, 0, 0, 1

    R4, 0, 0, 0, 1, 0, 0, 0, 0

    R5, 0, 0, 0, 0, 0, 0, 1, 0

];

Cross:

CrossTable(Field, Value) LOAD * RESIDENT Data;

LEFT JOIN(Data) LOAD F1, Field Resident Cross Where Value=1;

Drop Tables Cross;

- Ralf

Community Browser