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: 
Anonymous
Not applicable

if/Else condition and switch case in TOS

How to implement following SQL Statement in TOS using TMAP (using IF else or switch)

Case
When T1.last_time between @gone_start_int and @gone_end_int Then 'Goneaway'
When T1.last_time between @LPD_start_int and @LPD_end_int Then 'Lapsed'
When T1.first_time between @start_date_int and @end_date_int Then 'New' --New customers
Else 'RFV' --active customers
End as 'RFM_Segment'

Labels (4)
1 Reply
TRF
Champion II
Champion II

If you want to use if/else, tJavaRow component is what you need. Within tMap you case use ternary notation.