Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
GauravSS04
Contributor II
Contributor II

How to use Where Clause at script leve

In Organization report, under column Employee Type I want to select only rows where row value is 'Employee' and it should be done at script level. Could you help me with Where condition?

2 Solutions

Accepted Solutions
pradosh_thakur
Master II
Master II

 

[Leave Reason] AS [J.Leave Reason],
[Length of Service] AS [J.Length of Service],
[Email ID] AS [J.Email ID],
[Scope of Role] AS [J.Scope of Role],
Nationality AS [J.Nationality],
[Employee Group1]

FROM
[C:\Users\Desktop\Misc\xxxxxxx.xlsx]
(ooxml, embedded labels, table is Sheet1)

where [Employee Group1] ='Employee' ;

 the above gives you an error? I dont think so. You can use it in the source table itself.

Learning never stops.

View solution in original post

GauravSS04
Contributor II
Contributor II
Author

Hello Pradosh, its working now.
Thanks for correcting me....i couldn't relate the earlier solution. 🙂

View solution in original post

4 Replies
pradosh_thakur
Master II
Master II

Try below. Please check the field name and value once.

where [Employee Type] = 'Employee';

or

Where Match( [Employee Type] ,'Employee');
Learning never stops.
GauravSS04
Contributor II
Contributor II
Author

Thanks for sharing me with the solution....but this would be useful in case I am using in SQL and in Qlik it will throw an error by not mentioning the source after Match expression. I can use this even by using resident load and then joining with old table. However, I was looking for Where clause to be used in [Employee Group1] field and not use Resident load option...

[Leave Reason] AS [J.Leave Reason],
[Length of Service] AS [J.Length of Service],
[Email ID] AS [J.Email ID],
[Scope of Role] AS [J.Scope of Role],
Nationality AS [J.Nationality],
[Employee Group1]

FROM
[C:\Users\Desktop\Misc\xxxxxxx.xlsx]
(ooxml, embedded labels, table is Sheet1);

pradosh_thakur
Master II
Master II

 

[Leave Reason] AS [J.Leave Reason],
[Length of Service] AS [J.Length of Service],
[Email ID] AS [J.Email ID],
[Scope of Role] AS [J.Scope of Role],
Nationality AS [J.Nationality],
[Employee Group1]

FROM
[C:\Users\Desktop\Misc\xxxxxxx.xlsx]
(ooxml, embedded labels, table is Sheet1)

where [Employee Group1] ='Employee' ;

 the above gives you an error? I dont think so. You can use it in the source table itself.

Learning never stops.
GauravSS04
Contributor II
Contributor II
Author

Hello Pradosh, its working now.
Thanks for correcting me....i couldn't relate the earlier solution. 🙂