Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
manu1512
Creator
Creator

Data missing in Monthly QVD

Hi all,

 

I am creating the monthly qvd using following script.But some i am missing data of some months ...like 2018-02 and 2018-11.

 

//Calculate current month Situation
Trending:
LOAD Distinct
text(Timestamp(today(),'YYYY-MM')) as ReportMonth,
date(Timestamp(today(),'YYYY-MM')) as Report_Month,
ContractShipToCountry,
Portfolio,
ContractStatus,
Count(distinct Contract_Equipment_Id) as NonSMAEligibleScope,
Count(distinct if(not isnull(DQ_NonSMAProduct),Contract_Equipment_Id,null())) as NonSMAEligible,
Count(distinct if(SLCPType='SLCP' and isnull(DQ_NonSMAProduct) and not isnull(DQ_MissingSWSerial),Contract_Equipment_Id,null())) as MissingSWSerial,
Count(distinct if(SLCPType='SLCP' and isnull(DQ_NonSMAProduct),Contract_Equipment_Id,null())) as MissingSWSerialScope,
Count(distinct if(ApplyMap('MAPPICProducts',CommercialMaterial,'N')='N' and isnull(DQ_NonSMAProduct),Contract_Equipment_Id,null())) as MissingCounterScope,
Count(distinct if(ApplyMap('MAPPICProducts',CommercialMaterial,'N')='N'
and isnull(DQ_NonSMAProduct) and not isnull(DQ_MissingCounter),Contract_Equipment_Id,null())) as MissingCounter,
Count(Distinct if(EOLReached='Y' and isnull(DQ_NonSMAProduct),Contract_Equipment_Id,null())) as EOLEquipment,
Count(distinct if(isnull(DQ_NonSMAProduct),Contract_Equipment_Id,null())) as EOLEquipmentScope
RESIDENT SMA
WHERE (index('Active,Pending',ContractStatus)>0)
GROUP BY Timestamp(today(),'YYYY-MM'),ContractShipToCountry, Portfolio,ContractStatus;


LET vCount = NoOfRows('Trending');

LOAD Today() as Date, $(vCount) as RecordCount AutoGenerate 1 ;

// Load measures history from QVD for previous Months only
SET QVDFile='..\5_QVD\DQ_Trending.qvd';
IF NOT(isnull(QvdCreateTime('$(QVDFile)'))) then
Trace Loading metrics trending from QVD...;
Concatenate (Trending)
LOAD *
// ReportMonth,
// SoldToCountry as ContractShipToCountry,
// 'PCMS Portfolio' as Trend_Portfolio,
// NonSMAEligibleScope,
// NonSMAEligible,
// MissingSWSerial,
// MissingSWSerialScope,
// MissingCounterScope,
// MissingCounter,
// EOLEquipment,
// EOLEquipmentScope
FROM [$(QVDFile)](qvd)
WHERE ReportMonth < text(Timestamp(today(),'YYYY-MM'));
END IF

//Store trending in QVD (including today's values) for next reload
TRACE Saving updated Trending to QVD...;
STORE Trending INTO [$(QVDFile)];

 

Can any one help me in this.

 

 

Kind Regards

Manu

3 Replies
Anil_Babu_Samineni

Capture.PNGPlease explain, What the second point do?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
manu1512
Creator
Creator
Author

Hello,

Second point is concatenating with historical data......which is stored in the same qvd.....with same name trending qvd
manu1512
Creator
Creator
Author

If possible can you please suggest alternative way of creating this monthly qvd that is trending