Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MarioCenteno
Creator III
Creator III

Recovered lines : 0

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.

Labels (1)
1 Solution

Accepted Solutions
MarioCenteno
Creator III
Creator III
Author

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

View solution in original post

17 Replies
YoussefBelloum
Champion
Champion

Hi,

I recommend you add more details here, like the script you're using, screen shot from the error message..etc

MarioCenteno
Creator III
Creator III
Author

It shows me the following message

Help me please.

2018-07-23 10_08_44-Qlik Sense Desktop.png

Thiago_Justen_

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

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
MarioCenteno
Creator III
Creator III
Author

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

Thiago_Justen_

Share with us this piece of script that I've mentioned above.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
balabhaskarqlik

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.

MarioCenteno
Creator III
Creator III
Author

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.

balabhaskarqlik

Can you post the, Specific script, using for this table?

MarioCenteno
Creator III
Creator III
Author

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;