Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewsam
Creator
Creator

Direct Discovery

Hi All,

Please let me know how to code this in qlikview ,

CASE WHEN  cs.alt_wrkr_id='Y'

           THEN hw.alt_wrkr_id

ELSE 'XXXXXX' END AS alt_wrkr_id

the below sample code  is working fine , but i need to add the above condtion in to the below code

DIRECT QUERY

DIMENSION

Table1.hcmcore_wrkr_key

FROM Table1.hcmcore_worker

Thanks in advance

2 Replies
fabio182
Creator II
Creator II

Estimado, buenas tardes

Para poder añadir funciones propias de la herramienta SQL Server, tiene que hacer a través de la sentencia "native". Te comparto un ejemplo:

fact:

DIRECT QUERY

dimension

    "FECHA_PROCESO_ID",

    native( 'year(cast( convert(varchar(20),[FECHA_PROCESO_ID]) as date))') as ano,

    "MATERIAL_PP_ID",

    ORIGEN,

    CENTRO,

    "UNIDAD_MEDIDA"

    MEASURE

    "PESCA_PROPIA"

//SQL SELECT *

FROM "DWH_CORPORATIVO".OPERACIONES."FACT_PRODUCCION";

qlikviewsam
Creator
Creator
Author

Hi ,

Thanks for the reply, code  is useful