Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pragya
Creator
Creator

where clause on Quarter in expression

I have coded Quarter though

    Year(Date#(ArrivalDate, 'YYYY-MM-DD'))&'Q' & Ceil(Month(Date#(ArrivalDate, 'YYYY-MM-DD'))/3) as [Arrival Year Qtr]

this has quarters like

2011Q1

2011 Q2

2011Q3

2011Q4

2012Q1

2012Q2

2012Q3

-----

2019 Q3

etc till today

I want my dashboard to have all the data after 2011

so I am looking to do something like

where [Arrival Year Qtr] >  year 2011 ( so that no data from 2011 quarters are included)

Can anyone help please.

Thanks beforehand.

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Can you use a preload statement in the script:

 

Data:

load * where [Arrival Year Qtr] > '2011Q4';

load  *

         Year(Date#(ArrivalDate, 'YYYY-MM-DD'))&'Q' & Ceil(Month(Date#(ArrivalDate, 'YYYY-MM-DD'))/3) as [Arrival Year Qtr];

SQL Select * from someplace;

 

The load statements are processed from the bottom to the top.  So you get your original data from someplace, create the field [Arrival Year Qtr] and then filter on [Arrival Year Qtr].

View solution in original post

1 Reply
jwjackso
Specialist III
Specialist III

Can you use a preload statement in the script:

 

Data:

load * where [Arrival Year Qtr] > '2011Q4';

load  *

         Year(Date#(ArrivalDate, 'YYYY-MM-DD'))&'Q' & Ceil(Month(Date#(ArrivalDate, 'YYYY-MM-DD'))/3) as [Arrival Year Qtr];

SQL Select * from someplace;

 

The load statements are processed from the bottom to the top.  So you get your original data from someplace, create the field [Arrival Year Qtr] and then filter on [Arrival Year Qtr].