Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

case when?


Hola, intento crear una variable en el proceso de carga de datos a través de "Case When". Soy nueva en el QlikView, alguien me puede ayudar:

Select Ciclo,

Tipo_item,

Mes_uso,

Fact,

case when (Ciclo<>`ciclo01` and Tipo_item=`Cuotas` and Mes_uso='201407') then (Fact+Fact*0.33333) else Fact end as  Efecto_c

from Tabla

Muchas gracias

14 Replies
Not applicable
Author

Hi Mihaela.

you can use somenting like this

you have now your first query then put a name :

test:

load...

from

then you can select it table with command resident:

load

sum(if(Mes_uso...))...

resident test

group by Clase_DB,....

;

Not applicable
Author

Hello!  I am new to Qlikview also.  I want to do a CASE statement in Editor.  Is it done in the LOAD section?  What is the syntax for a CASE?  I need something like this:

Case when UNIT like 'CH%" then "C" else "?" end 'Facility'

Thanks for any help!

Leonard

MarcoWedel

as already stated, there is no case when command in QlikView, you have to use an

If(condition, expression true, expression false)

instead.

hope this helps

regards

Marco

MarcoWedel

or in your case:

LOAD somefields,

          If(UNIT like 'CH', 'C', '?') as Facility

FROM yoursource;

anbu1984
Master III
Master III

Case statement is not available in Qlikview. Try "If" as Marco suggested.