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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

Need help on sql to qlik

Hi team,

Can any one help me to convert below sql query to qlik

case(case when  id='bose' then coalesce(incident id, id) else id end) when 'AD' then 'Application Desktop'

when 'NEW' then  'SCOPE' else Id end) as condition

And also please any one tell what lag function do in sql

And what is the similar function in qlik.

Thanks in advance,

Thanks,

Chinnu.

1 Solution

Accepted Solutions
sunny_talwar

May be this:


If(

     If(id = 'bose', If(Len(Trim([incident id])) = 0, id, [incident id]), id) = 'AD', 'Application Desktop',

     If(

          If(id = 'bose', If(Len(Trim([incident id])) = 0, id, [incident id]), id) = 'NEW', 'SCOPE', id))) as condition

View solution in original post

4 Replies
tomasz_tru
Specialist
Specialist

Why don'tt you use SQL in Qlik load script?

BTW. equivalent of COALESCENCE in Qlik is ALT() function - but only for numeric.

Tomasz

sergio0592
Specialist III
Specialist III

Lag function returns values from a previous row in the table. Equivalent in Qlikview is Above() function.

sunny_talwar

May be this:


If(

     If(id = 'bose', If(Len(Trim([incident id])) = 0, id, [incident id]), id) = 'AD', 'Application Desktop',

     If(

          If(id = 'bose', If(Len(Trim([incident id])) = 0, id, [incident id]), id) = 'NEW', 'SCOPE', id))) as condition

chinnu123
Creator
Creator
Author

Hi Sunny,

Thanks for your time on this, It's working fine

Thanks,

Chinnu.