Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
alvinford
Contributor III
Contributor III

How to Get Values in One Table

Hi ,

I have 2 QVDs Temp and Temp2. Monthly Amount is in my Temp2 Table.  My requirement is, For  the Key values found in the Temp table the MonthlyAmount has to be calculated from Termstart  to TermEnd Date (i.e to overwrite the Startdate and EndDate values in the Temp2 with TermstartDate and TermEndDate for the key Values from Temp) The MonthlyAmount for Key Value in the Temp2  remains same..

Please find the attached QVDs.

Please guide me to achieve this ..

Temp:

LOAD Key,

    
TermEndDate,

    
TermStartDate

FROM

Temp.Qvd

(
qvd);


Temp2:

LOAD Key,

    
BuildingID,

    
UnitID,

    
ChargeTypeID,

    
StartDate,

    
EndDate,

    
MonthlyAmount

FROM

Temp2.Qvd

(
qvd);

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Try with this



Temp2:

LOAD Key,

    
BuildingID,

    
UnitID,

    
ChargeTypeID,

     //
StartDate, //Remove this field

     //
EndDate,  //Remove this field

    
MonthlyAmount

FROM

Temp2.Qvd

(
qvd);

left join

LOAD Key,

    
TermEndDate AS EndDate,

    
TermStartDate AS StartDate

FROM

Temp.Qvd

(
qvd);

alvinford
Contributor III
Contributor III
Author

Hi Adimulam,

If I remove the Startdate and enddate I cant get the startdate and End Date for the values in Table Temp2.

Regards,

Alvin.