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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
knightwriter
Creator III
Creator III

Load query from Script: 2015 & 2016

Hi All,

I am looking to ammend my script to include 2016 data. Currently I am using the InYear expression and a specific car type (as below).

How do I change this to incorporate 2015, 2016 and my specific car type?

LOAD * FROM \\$(oEnvironment)\QlikView\Qvds\Cars.qvd (qvd)

where InYear([Car.Planned Sell Date], Today(), 0) AND

([Activity.Type]='Car Sales - General') ;

Many thanks.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

LOAD *

FROM \\$(oEnvironment)\QlikView\Qvds\Cars.qvd (qvd)

Where (InYear([Car.Planned Sell Date], Today(), 0) or InYear([Car.Planned Sell Date], AddYears(Today(), 1), 0)) AND

([Activity.Type]='Car Sales - General');

View solution in original post

4 Replies
sunny_talwar

May be this:

LOAD *

FROM \\$(oEnvironment)\QlikView\Qvds\Cars.qvd (qvd)

Where (InYear([Car.Planned Sell Date], Today(), 0) or InYear([Car.Planned Sell Date], AddYears(Today(), 1), 0)) AND

([Activity.Type]='Car Sales - General');

Anonymous
Not applicable

Hi,

could this script work for you?:

LOAD * FROM \\$(oEnvironment)\QlikView\Qvds\Cars.qvd (qvd)

where (InYear([Car.Planned Sell Date], Today(), 0)

or

InYear([Car.Planned Sell Date], AddYears(Today(),1), 0))

AND

([Activity.Type]='Car Sales - General') ;

tamilarasu
Champion
Champion

@Hi knightRaider,

Another solution,


LOAD * FROM \\$(oEnvironment)\QlikView\Qvds\Cars.qvd (qvd)

where Year([Car.Planned Sell Date]) ='2015' And  Year([Car.Planned Sell Date])='2016' AND

([Activity.Type]='Car Sales - General') ;


Or


Where match(Year([Car.Planned Sell Date]),'2015','2016') And ([Activity.Type]='Car Sales - General');

buzzy996
Master II
Master II

try this,

match(InYear([Car.Planned Sell Date], Today(), 0),'2015','2016')