Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to get the min condition date from this table:
Set Data=10/02/2018;
LET Mes=Date(Data,'MM/YYYY');
For vDias = 0 to 2
Data=Date(Data-$(vDias));
Mes=Date(Data,'MM/YYYY');
For vMeses = 0 to 6
//***************************************************
Exibicao:
LOAD DISTINCT
OID_METER,
OID_SYSTEM,
OID_GROUP,
NAME_SYSTEM,
CONS0,
'$(Data)' AS DATA_EXTRACAO,
('$(Mes)') AS MES_ANO_EXTRACAO
FROM [lib://Dados/MI/Leituras/Consumo/Condominios/FATURA/FATURA_EXIBICAO_$(vCarga).qvd](qvd);
//***************************************************
Data=AddMonths(Data,-1);
Mes=Date(Data,'MM/YYYY');
Next
Set Data=10/02/2018;
Mes=Date(Data,'MM/YYYY');
Next
So, in chart MES_ANO_EXTRACAO appears ok to me, but when i try Min(MES_ANO_EXTRACAO) i got null
Hi,
with this code it works
Exibicao:
LOAD DISTINCT
OID_METER,
OID_SYSTEM,
OID_GROUP,
NAME_SYSTEM,
CONS0,
'$(Data)' AS DATA_EXTRACAO,
DATE(DATE#('$(Mes)','MM/YYYY'),'MM/YYYY') AS MES_ANO_EXTRACAO
FROM [lib://Dados/MI/Leituras/Consumo/Condominios/FATURA/FATURA_EXIBICAO_$(vCarga).qvd](qvd);
Hi,
with this code it works
Exibicao:
LOAD DISTINCT
OID_METER,
OID_SYSTEM,
OID_GROUP,
NAME_SYSTEM,
CONS0,
'$(Data)' AS DATA_EXTRACAO,
DATE(DATE#('$(Mes)','MM/YYYY'),'MM/YYYY') AS MES_ANO_EXTRACAO
FROM [lib://Dados/MI/Leituras/Consumo/Condominios/FATURA/FATURA_EXIBICAO_$(vCarga).qvd](qvd);
please closed the thread if you get the answer.
Regards
I think better exclude the question instead mark right answer to myself
mark your answer correct , because it will help other qliker to find solution.
Regards,