Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Zaidan_as
Creator
Creator

Creating Two Filtered Sheets from One Excel CSV file

Hello Experts,

So as i mention in the Subject, I want to make two filtered sheets from one CSV file excel. 
The illustration like this :
Suppose I have one CSV file excel that contains many columns, one of the columns is "Agent Group Name".
Agent Group Name contains this data

Zaidan_as_1-1647390366197.png

 

Now I want to make two sheets, from one csv files, where the first sheets just showing the data filtered from the inside red box, and the second sheets just showing the data filtered from the inside of blue box.
I want to achieve this without using the Filter Pane in QlikSense.

I comes up for two solutions right now, but I don't know how to achieve it. the solutions are :
1. Generate two tables from one excel csv file
2. Hard code for each sheet to filter the data ( I don't want to use this because if the data in agent group changed, that means I need to re-code again ) 

Remember, the data that i import to QlikSense is One Excel CSV file that contains all the data. 

Labels (4)
1 Solution

Accepted Solutions
Zaidan_as
Creator
Creator
Author

Ok after surfing through all the Community and Internet, I comes up for the solutions. 
Like the first suggested solution namely generate two tables from one excel csv file.

So this is the step :
1. Open the load editor
2. Create new section
3. Load (generate) two tables using this script

Table1 :
LOAD
ID as [1ID],
Priority as [1Priority],
Timestamp(Timestamp#([Last Updated Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Last Updated Date],
[Urgency] as [1Urgency],
[Status] as [1Status],
Timestamp(Timestamp#([First Response Date],'YYYY-MM-DD hh:mm:ss TT')) as [1First Response Date],
[Category] as [1Category],
[Item Category] as [1Item Category],
UPPER([Agent Group Name]) as [1Agent Group Name],
Timestamp(Timestamp#([Assigned Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Assigned Date],
[Plant] as [1Plant],
[Subject] as [1Subject],
[Case Category] as [1Case Category],
Timestamp(Timestamp#([Created Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Created Date],
Timestamp(Timestamp#([Closed Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Closed Date],
[Sub-Category] as [1Sub-Category],
[Department Name] as [1Department Name],
[Requester Name] as [1Requester Name],
if([Status]='Open',1,if([Status]='Pending',1,if([Status]='Waiting on End user',1,0))) as [1OutstandingCount],
num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00') as [1CompleteDuration],
if(len(trim([Agent Name]))=0,'No Agent',[Agent Name]) as [1Name Agent]
from [lib://AttachedFiles/report_tickets.csv]
(txt, utf8, embedded labels, delimiter is ',', msq)

Where NOT MATCH("Agent Group Name",'SBM Apps team','SCC Apps Team','SPL Apps Team','SSIP Apps Team') > 0;


Table2 :
LOAD
ID as [2ID],
Priority as [2Priority],
Timestamp(Timestamp#([Last Updated Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Last Updated Date],
[Urgency] as [2Urgency],
[Status] as [2Status],
Timestamp(Timestamp#([First Response Date],'YYYY-MM-DD hh:mm:ss TT')) as [2First Response Date],
[Category] as [2Category],
[Item Category] as [2Item Category],
UPPER([Agent Group Name]) as [2Agent Group Name],
Timestamp(Timestamp#([Assigned Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Assigned Date],
[Plant] as [2Plant],
[Subject] as [2Subject],
[Case Category] as [2Case Category],
Timestamp(Timestamp#([Created Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Created Date],
Timestamp(Timestamp#([Closed Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Closed Date],
[Sub-Category] as [2Sub-Category],
[Department Name] as [2Department Name],
[Requester Name] as [2Requester Name],
if([Status]='Open',1,if([Status]='Pending',1,if([Status]='Waiting on End user',1,0))) as [2OutstandingCount],
num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00') as [2CompleteDuration],
if(len(trim([Agent Name]))=0,'No Agent',[Agent Name]) as [2Name Agent]
from [lib://AttachedFiles/report_tickets.csv]
(txt, utf8, embedded labels, delimiter is ',', msq)

Where MATCH("Agent Group Name",'SBM Apps team','SCC Apps Team','SPL Apps Team','SSIP Apps Team') > 0;

Zaidan_as_0-1647399838156.png

4. Click the "Load Data"

Hope it helps for other

View solution in original post

1 Reply
Zaidan_as
Creator
Creator
Author

Ok after surfing through all the Community and Internet, I comes up for the solutions. 
Like the first suggested solution namely generate two tables from one excel csv file.

So this is the step :
1. Open the load editor
2. Create new section
3. Load (generate) two tables using this script

Table1 :
LOAD
ID as [1ID],
Priority as [1Priority],
Timestamp(Timestamp#([Last Updated Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Last Updated Date],
[Urgency] as [1Urgency],
[Status] as [1Status],
Timestamp(Timestamp#([First Response Date],'YYYY-MM-DD hh:mm:ss TT')) as [1First Response Date],
[Category] as [1Category],
[Item Category] as [1Item Category],
UPPER([Agent Group Name]) as [1Agent Group Name],
Timestamp(Timestamp#([Assigned Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Assigned Date],
[Plant] as [1Plant],
[Subject] as [1Subject],
[Case Category] as [1Case Category],
Timestamp(Timestamp#([Created Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Created Date],
Timestamp(Timestamp#([Closed Date],'YYYY-MM-DD hh:mm:ss TT')) as [1Closed Date],
[Sub-Category] as [1Sub-Category],
[Department Name] as [1Department Name],
[Requester Name] as [1Requester Name],
if([Status]='Open',1,if([Status]='Pending',1,if([Status]='Waiting on End user',1,0))) as [1OutstandingCount],
num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00') as [1CompleteDuration],
if(len(trim([Agent Name]))=0,'No Agent',[Agent Name]) as [1Name Agent]
from [lib://AttachedFiles/report_tickets.csv]
(txt, utf8, embedded labels, delimiter is ',', msq)

Where NOT MATCH("Agent Group Name",'SBM Apps team','SCC Apps Team','SPL Apps Team','SSIP Apps Team') > 0;


Table2 :
LOAD
ID as [2ID],
Priority as [2Priority],
Timestamp(Timestamp#([Last Updated Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Last Updated Date],
[Urgency] as [2Urgency],
[Status] as [2Status],
Timestamp(Timestamp#([First Response Date],'YYYY-MM-DD hh:mm:ss TT')) as [2First Response Date],
[Category] as [2Category],
[Item Category] as [2Item Category],
UPPER([Agent Group Name]) as [2Agent Group Name],
Timestamp(Timestamp#([Assigned Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Assigned Date],
[Plant] as [2Plant],
[Subject] as [2Subject],
[Case Category] as [2Case Category],
Timestamp(Timestamp#([Created Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Created Date],
Timestamp(Timestamp#([Closed Date],'YYYY-MM-DD hh:mm:ss TT')) as [2Closed Date],
[Sub-Category] as [2Sub-Category],
[Department Name] as [2Department Name],
[Requester Name] as [2Requester Name],
if([Status]='Open',1,if([Status]='Pending',1,if([Status]='Waiting on End user',1,0))) as [2OutstandingCount],
num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00') as [2CompleteDuration],
if(len(trim([Agent Name]))=0,'No Agent',[Agent Name]) as [2Name Agent]
from [lib://AttachedFiles/report_tickets.csv]
(txt, utf8, embedded labels, delimiter is ',', msq)

Where MATCH("Agent Group Name",'SBM Apps team','SCC Apps Team','SPL Apps Team','SSIP Apps Team') > 0;

Zaidan_as_0-1647399838156.png

4. Click the "Load Data"

Hope it helps for other