Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have problems with this process.
does not respect my condition if it comes in red.
I can Help, Please
tmp_Cuotas_Sucursal:
LOAD distinct
%Pto_vta_ID,
Clasificación_Cuotas,
CuotaUnidades,
Fecha,
// Año,
ValorPorcentual2
FROM
Transformación\Fact\Cuotas_DiariasUnidades2.qvd (qvd)
where %Pto_vta_ID='54NG364' and Clasificación_Cuotas='Mac'
and Fecha>='12/01/2020';
NoConcatenate
Cuotas_Sucursal:
LOAD %Pto_vta_ID,
Clasificación_Cuotas,
CuotaUnidades,
Fecha,
ValorPorcentual2
Resident tmp_Cuotas_Sucursal
where %Pto_vta_ID='54NG364' and Clasificación_Cuotas='Mac'
and Fecha>='12/01/2020'
order by ValorPorcentual2,
Clasificación_Cuotas ,
%Pto_vta_ID
desc
;
Drop table tmp_Cuotas_Sucursal;
//Variable de cuota Total
Ciclo_CuotaTotal:
Load Distinct CuotaUnidades
Resident Cuotas_Sucursal;
Let v_CuotasTotal = peek('CuotaUnidades',0,'Ciclo_CuotaTotal');
trace $(v_CuotasTotal);
//drop table Cuotas_Sucursal;
Drop Table Ciclo_CuotaTotal;
If $(v_CuotasTotal) <= 7 Then
for i= 0 to $(v_CuotasTotal)
Trace $(v_CuotasTotal);
// if '$(i)' <= '$(v_CuotasTotal)' then
//
// let cuota_diaria= 1; Else
// Let cuota_diaria= 0;
//
// trace $(cuota_diaria);
//
left join (Cuotas_Sucursal)
LOAD
%Pto_vta_ID,
Fecha,
Clasificación_Cuotas,
ValorPorcentual2,
CuotaUnidades,
// '$(cuota_diaria)' as ValorPorcentual3,
if($(i)<$(v_CuotasTotal), 1,0) as ValorP,
// ValorPorcentual2
1 as diferente
Resident Cuotas_Sucursal
order by
ValorPorcentual2,
Clasificación_Cuotas ,
// Fecha,
%Pto_vta_ID
desc
;
//ENDIF
NEXT
ENDIF
Hola como estas?
Probaste con comillas en la variable? ('') '$(v_CuotasTotal)'
En algunos casos las pones, en otras no
Saludos