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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Labels (1)
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";

Anonymous
Not applicable
Author

Hi ,

Thanks for the reply, code  is useful