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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

Regarding Reload twice to 1 exel file value gets double in QVD

Dear All,

I have one exel file and that has to be concatenating with one QVD ... My query is when i say reload the application then exel file concatenate with QVD only once.

fine i want this only but when i say reload again then the same exel file is gets concatenate again with QVD and the value gets double in the QVD  ..if i say reload again then value gets thrice in the QVD...and so on..

My requirement is the exel file should get merged/concatenate with QVD only once ...not multiple time...no matter how many times i reload the application. What should i have to do to avoid double of value. 

Below is my script ..kindly help if any clue/suggestion/solution.

Break_Exceed_Report:

LOAD Date,  
     AgentName,
     AgentName&Date as KEYFORTEST,
     EventStartTime,
     EventType,
     Reason,
     EventDuration,
     Team,
     TL
    
FROM

(qvd);    
    
concatenate

Load
     Date(Date,'DD-MM-YYYY') AS Date,
     AgentName&Date as KEYFORTEST,
     AgentName,
     EventStartTime,
     EventType,     
     Upper(Reason) AS Reason,
     Interval(Time(EventDuration),'hh:mm:ss') As EventDuration,
         
     //EventDuration,
     Team,
     TL
    
FROM

(ooxml, embedded labels, table is Sheet1);    

Store Break_Exceed_Report into 'E:\Qlikview\ERGO\Model_App\Sarfaraz\TAT Data\Break Exeed and Agent Not Ready Report\QVD Data\Break_Exceed_Report.qvd';

Regards

Sarfaraz
 

6 Replies
stabben23
Partner - Master
Partner - Master

Hi, If the xlsx file is contain newer data then load this first and then concatenate the QVD file. Also add Where not (Exists(KEYFORTEST)) after the qvd load.

Not applicable

You mentioned the value gets doubled when i reload it for the second time,I didn't get which value got doubled. Can you describe it clearly.

Can you share your app if possible to get more insight into your problem

sarfaraz_sheikh
Contributor III
Contributor III
Author

Dear Staffan,

can you keep any example here for more understanding of your solution....

Sarfaraz

stabben23
Partner - Master
Partner - Master

Break_Exceed_Report:
LOAD
*,
Key
FROM
C:\QVData\XLSfiles\DAYTRANS.xls
;


Concatenate (Break_Exceed_Report)
LOAD
*,
Key   
FROM
C:\QVData\QVDfiles\PreviousLoad.qvd
(qvd) Where not (Exists(Key));

Forgot this:

Store Break_Exceed_Report into 'E:\Qlikview\ERGO\Model_App\Sarfaraz\TAT Data\Break Exeed and Agent Not Ready Report\QVD Data\Break_Exceed_Report.qvd';

hariprasadqv
Creator III
Creator III

use where condition with Exists() along with a key field in exists while loading the data and storing it to qvd.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this script

Break_Exceed_Report:

LOAD Date,  
     AgentName,
     AgentName&Date(Date,'DD-MM-YYYY') as KEYFORTEST,
     EventStartTime,
     EventType,
     Reason,
     EventDuration,
     Team,
     TL
    
FROM

(qvd);    
    
concatenate

Load
     Date(Date,'DD-MM-YYYY') AS Date,
     AgentName&Date(Date,'DD-MM-YYYY') as KEYFORTEST,
     AgentName,
     EventStartTime,
     EventType,     
     Upper(Reason) AS Reason,
     Interval(Time(EventDuration),'hh:mm:ss') As EventDuration,
         
     //EventDuration,
     Team,
     TL
    
FROM

(ooxml, embedded labels, table is Sheet1)

WHERE NOT EXISTS(KEYFORTEST, AgentName&Date(Date,'DD-MM-YYYY'));

Store Break_Exceed_Report into 'E:\Qlikview\ERGO\Model_App\Sarfaraz\TAT Data\Break Exeed and Agent Not Ready Report\QVD Data\Break_Exceed_Report.qvd';

Regards,

Jagan.