Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have problem when try load data show me message "Recovered lines : 0" . Sometines if load the data, others will not.
Does anyone know why? Used Qlik Sense Desktop.
I already solved it, stop using the subquery and upload data for the last 4 months. Then take the average of the last 3 months in a function vs the current consumption.
The avg last 3 months:
SUM({$<[FECHA_PROCESO.autoCalendar.Date]=
{'>=$(=AddMonths(Today(),-4))<=$(=AddMonths(Today(),-1))'}>}CSMO_ACTUAL/3)
Current month
SUM({<[FECHA_PROCESO.autoCalendar.Year]={'$(vMaxYear)'},
[FECHA_PROCESO.autoCalendar.Month]={'$(vMaxMonth)'},[FECHA_PROCESO.autoCalendar.Day]={'<=$(vMaxDay)'},
FECHA_PROCESO=,[FECHA_PROCESO.autoCalendar.YearMonth]=>}CSMO_ACTUAL)
Thanks for the help
Hi,
I recommend you add more details here, like the script you're using, screen shot from the error message..etc
It shows me the following message
Help me please.
Mario,
It seems like your query doesn't match anything. It will be good if you could take a scrrenshot of VENTA_GC's script and share it with us. Maybe its result is 0 because of some filter made in its script.
Cheers
The funny thing is that when I do the extraction of the data in toad, if there is data even when I showed them in qlik.
I think weird
Share with us this piece of script that I've mentioned above.
Check the data availability of the first table in Data source, tweak the SQL script.
May be, if you're applying any calculations in SQL script, check that did you specified Group by Clause or not at the end.
Hi!
Actually I am calculating the average of the sales of the last 3 months of the current month and then I compare it with the actual sale
Maybe that calculation is affecting me the data load.
Can you post the, Specific script, using for this table?
This is:
[VENTA_GC_2018]:
LOAD
[COD_UNICOM],
[CICLO],
[NIS_RAD],
[NOMBRE_CLIENTE],
[CSMO_ANT],
[CSMO_ACTUAL],
[DESC_TAR];
SELECT b.cod_unicom,b.ciclo,b.nis_rad,c.nom_cli || ' ' || c.ape1_cli|| ' ' || c.ape2_cli AS NOMBRE_CLIENTE,
//--SubQuery Csmo_antes--
avg(NVL((Select round(sum(hf.csmo_kwh)/3) as csmo
FROM bi_billing hf
WHERE hf.nis_rad = b.nis_rad
and to_char(hf.fecha_proceso,'YYYYMM') between TO_CHAR(add_months(b.fecha_proceso,-4),'YYYYMM')
and TO_CHAR(add_months(b.fecha_proceso,-2),'YYYYMM') ),0)) csmo_ant,sum(b.csmo_kwh) Csmo_actual,t.desc_tar
from bi_billing b, bi_tarifas t, BI.MVSUMCLIENTES c
where b.CO_CONCEPTO IN ('CC221','CC250','CC270','CC280','CC320','CC321')
AND B.NIS_RAD = C.NIS_RAD
AND b.TIP_REC IN ('TR010','TR014')
AND b.cod_tar = t.cod_tar
//AND b.cod_unicom = 4111
AND T.DEMANDA IN ('GRANDES','MEDIANAS')
//AND ROWNUM <10
//AND B.nis_Rad in(3105136)
AND b.fecha_proceso >= To_date('20180701','YYYYMMDD') and b.fecha_proceso <= To_date('20180723','YYYYMMDD')
group by b.cod_unicom,b.ciclo, b.nis_rad,b.nis_rad,t.desc_tar,c.nom_cli,c.ape1_cli,c.ape2_cli;