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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vijaysahu2
Creator
Creator

How to user If ..Then..elseIF to create a column

Hi All

Can we use this if then elseif to create a column name my script?

IF a>0 then

'Current value

ELSEIF a<0 THEN

'Previous Value'

ELSE

'None'

END IF AS MyColumnName

Or

Do we have any alternative to do this comparison and form a column.?

Thanks

Vijay Sahu

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this way?

IF(a>0, 'Current value', IF(a<0, 'Previous Value, 'None'))

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

View solution in original post

2 Replies
Anil_Babu_Samineni

Try this way?

IF(a>0, 'Current value', IF(a<0, 'Previous Value, 'None'))

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
vijaysahu2
Creator
Creator
Author

Thanks anil..this helped me..