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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

in clause in Qlickview -> match function?

Hi,

I want to know how can I male a IN clause (typical SQL) in Qlicjkiew. Do I have to use match function?

LOAD fecha,

  (Date(monthstart(fecha), 'MMM-YY')) as periodo,

  WeekDay(fecha) as dia_semana,

     ciudad,

     pais,

     cliente,

     producto,

     venta,

     margen,

   if (producto in ('P1', 'P2'), 'T1', 'T2') as tipo_producto,

     tipo_servicio,

     canal

FROM

(ooxml, embedded labels, table is detalle_ventas_canal_margen);

Thanks in advance,

4 Replies
Anonymous
Not applicable
Author

Try :

   if ( match ( producto , 'P1', 'P2' ) , 'T1', 'T2' )  as tipo_producto,

buzzy996
Master II
Master II

u can also try,  if ( wildmatch ( producto , 'P1', 'P2' ) , 'T1', 'T2' )  as tipo_producto,

Not applicable
Author

Following post might be helpful

in/contain clause

shambhub
Creator
Creator

Hi Jaun,

You can use below expression

if (producto mixmatch ('P1', 'P2'), 'T1', 'T2') as tipo_producto

Best Regards

Shambhu B