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: 
Anonymous
Not applicable

how to solve this problem?

i have a table with start date and enddate taht begins from 1965 .how to turn the lines before 2015 for both start and end dates?

8 Replies
MK_QSL
MVP
MVP

what you mean by to turn the lines?

jerifortune
Creator III
Creator III

Could you share sample of the source data and what you hope to achieve?

Anonymous
Not applicable
Author

i mean to remove them.i would just keep the lines where start and end date >=2015

wdchristensen
Specialist
Specialist

Maybe this:

if(StartDt<'01/01/2015' and EndDt<'01/01/2015', 'Before 2015', 'After 2015')

Anonymous
Not applicable
Author

I guess you want to filter the data from the table after certain date and then bring it into the Visual Canvas.

If that is the case you can filter the data in your script editor using WHERE clause.

jerifortune
Creator III
Creator III

In your load Script you can include the where statement if you don't want those lines

TableSample:
Load
     A,
     B,
     StartDate,
     EndDate
From ..........
Where Year(StartDate) >=2015 AND Year (EndDate) >=2015

Hope this helps

passionate
Specialist
Specialist

Add On open of the sheet trigger.
like a trigger is added on Button in the given solution

vishalarote
Partner - Creator II
Partner - Creator II

Try this it will kept 2015 to up to date data

e.g.

Date:

load * inline [

StartDate,EndDate

2011,2011

2012,2012

2013,2013

2014,2014

2015,2015

2016,2016

2017,2017

2018,2018

];

store Date into 'C:\Users\Desktop\StartDate.qvd'(qvd);

drop table Date;

Set vStart='2015';

Set vEnd='Year(today())-1';

for vYear=$(vStart) to $(vEnd)

set vNewYear=$(vYear);

😧

LOAD if(StartDate=$(vNewYear),StartDate) as StartDate,

     if(EndDate=$(vNewYear),EndDate) as EndDate

FROM

(qvd);

nextCapture 2.PNG