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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

How to find a single record in a data source

Hi Friends,

I have following data table in my QV doc. 

Screenshot_1.png

From the data table I want to mark record highlighted in yellow as Y in a separate field namely  'FLAG'  In other words all single record (RISK) with TRN_TYPE= 'R' should be marked as 'Y' in the FLAG field in Data load script. Kindly help me with syntax for it .

1 Reply
lockematthewp
Creator II
Creator II

When loading your data in the script, just create another field called FLAG. Like:

LOAD [POLICY_NO],

     [R_SEQ],

     [RISK],

    [TRN_TYPE],

    [FROM_DATE],

    if (count([RISK]) = 1 and [TRN_TYPE] = 'R', 'Y', 'N') as [FLAG]

FROM ….