Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
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

Labels (1)
2 Replies
kiranmanoharrode
Creator III
Creator III

hi Gabriele,

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

rbecher
Partner - Master III
Partner - Master III

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

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine