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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunobertels
Master
Master

pick cell and repeact it as new dimension

Hi community 

 

I'am facing an issue with an excel file and the format of data in it 

 

Let's say i have this kind of data in an excel file 

Agent 1005   
    
    
 TypeNumberTime
    
 Wait410h21'09
 Pause7457h00'02
 Break150h35'06
 Personnelle162h56'02
 E-mails3851h59'43
 Learning10h14'22
 meeting10h38'36
 mission30h36'13
Agent 1009   
    
    
 TypeNumberTime
    
 Wait211h42'41
 Pause10h00'04
 Break10h00'04
 Personnelle60h24'18
 E-mails20h03'21
 Learning10h11'33
 meeting30h09'24


first column is agent number ( ex agent 1005) 
As you can see :

then some others data as type , number and time 

So in final i would have somethink like below : 

AGENT NUMBERTypeNumberTime
Agent 1005Wait410h21'09
Agent 1005Pause7457h00'02
Agent 1005Break150h35'06
Agent 1005Personnelle162h56'02
Agent 1005E-mails3851h59'43
Agent 1005Learning10h14'22
Agent 1005meeting10h38'36
Agent 1005mission30h36'13
Agent 1009Wait211h42'41
Agent 1009Pause10h00'04
Agent 1009Break10h00'04
Agent 1009Personnelle60h24'18
Agent 1009E-mails20h03'21
Agent 1009Learning10h11'33
Agent 1009meeting30h09'24

 

But not able to achieve this in load script 

 

Can someone help me with that 

Thanks in advance 

Regards  

Labels (2)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this:

LOAD
If(Len(Trim(@1))>0,@1, peek([AGENT NUMBER])) as [AGENT NUMBER],
If(Len(Trim(@2))>0 AND @21<> 'Type', @2 as Type,
If(Len(Trim(@3))>0 AND @3<> 'Time', @2 as Time
FROM ...excel file...
If(Len(Trim(@4))>0 AND @4<> 'Number', @4 as Number,

talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this:

LOAD
If(Len(Trim(@1))>0,@1, peek([AGENT NUMBER])) as [AGENT NUMBER],
If(Len(Trim(@2))>0 AND @21<> 'Type', @2 as Type,
If(Len(Trim(@3))>0 AND @3<> 'Time', @2 as Time
FROM ...excel file...
If(Len(Trim(@4))>0 AND @4<> 'Number', @4 as Number,

talk is cheap, supply exceeds demand
brunobertels
Master
Master
Author

Hi Gysbert 

 

Thanks a lot , in works fine and it is very simple in the end 

Bruno