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: 
Gowtham174
Creator
Creator

Need to create a flag

Hi All,

Can you please help me to stamp flag based on the previous record

YearMonthCodeFlag
20190723456781
20190778656471
20190823456782
201908435671

 

In the data if we have same record in current month i need to stamp 2 else 1

 

if (Flag > PreviousMonthFlag ,PreviousMonthFlag +1,1) 

I need this condition can you help me to get this.

 

Thanks,

Gowtham

2 Replies
Anil_Babu_Samineni

Is that output of Flag is correct? Because, You want in the same month But i am not finding same month for Flag 2. May be this?

AutoNumber(RowNo(), Code) as Flag

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Vegar
MVP
MVP

I do not really understand the details of what you are trying to do, but by the sound of it I would advise you to look I to the Peek() function.

If you want help with the details you could help by posting a sample table of your source data and a table of your desired result. (I'm not really sure if the table you have posted  is the input or desired output).