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: 
davidfagundes
Contributor III
Contributor III

Conta no script

Bom dia a todos pode me ajudar em uma conta

Temp1:
load
//EMPRESA as EMPRESAMarg,
//REVENDA as REVENDAMarg,
//CONTATO as CONTATOMarg,
//VEICULO  as VEICULOMarg,
PK_Emp_Rv_Cont_Vei,
EMPRESA&'-'&REVENDA&'-'&CONTATO&'-'&VEICULO as PK_margem,
[VAL VDA S/MARCIO]  as VAL_VDA_S_MARCIO,
//[VAL COMP S/MARCIO] as VAL_COMP_S_MARCIO,
VAL_HOLDBACK as VALHOLDBACK
Resident FMC;

temp2:
Join(Temp1)
LOAD
PK_Emp_Rv_Cont_Vei,
PK_Emp_Rev_Prop
Resident Vei_prop;

temp3:
Join(Temp1)
LOAD
PK_Emp_Rev_Prop,
Condicao_48_VP
Resident Vei_pag;

Margem:
LOAD*,
(VAL_VDA_S_MARCIO - Condicao_48_VP)as Venda2
;
LOAD
PK_margem,
VAL_VDA_S_MARCIO,
Condicao_48_VP
Resident Temp1;

DROP Table Temp1;

esse é o script que estou usando, porem quando eu executo ele não funciona corretamente

VAL_VDA_S_MARCIO - Condicao_48_VP ele so faz somente onde tem   Condicao_48_VP, e os de mais ficam zerados ,

e se eu faço um

if( Condicao_48_VP, VAL_VDA_S_MARCIO - Condicao_48_VP , VAL_VDA_S_MARCIO) ele distorce os valores...

consegue me ajudar ?

grato desde ja

Labels (1)
0 Replies