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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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

Labels (1)
3 Replies
prma7799
Master III
Master III

Anil_Babu_Samineni
MVP
MVP

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