Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

Need help on converting Sql syntax to Qlik

Hi Team,

Can any one please help on converting below sql syntax to qlikview

lag(level_Id) over (partition by Incident_Id order by UPDATED_DATE) previous_level_ID

3 Replies
Anil_Babu_Samineni

Don't create duplicate Need help on converting SQl code to qlik code

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
woshua5550
Creator III
Creator III

Maybe like this:


LOAD *,
           IF(Incident_Id=Previous(Incident_Id),Previous(level_Id),Null()) as previous_level_ID
From <Your table name>

Order By Incident_Id,UPDATED_DATE ;

Previous() function in QV script is equivalent to lag() function in SQL