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

If statement and dates

Hello,

I want to be able to create the following,

If a project end date is between 4/1/2014 and 6/30/2014, then 2014 2nd qtr should display or if it ends between 10/1/2015 and 12/31/2015, then it should read 2015 4th qtr etc.

Does anyone know how to do that in the expressions?

Thanks in advance.

Tom

=if([Project End]<'3/31/2014','2014 1st Qtr',

if([Project End]>'4/1/2014' or < '6/30/2014','2014 2nd Qtr',

if([Project End]>'7/1/2014' or < '9/31/2014','2014 3rd Qtr',

if([Project End]>'10/1/2014' or < '12/31/2014','2014 4th Qtr',

if([Project End]>'1/1/2015' or < '3/31/2015','2015 1st Qtr',

if([Project End]>'4/1/2015' or < '6/30/2014','2015 2nd Qtr',

if([Project End]>'7/1/2015' or < '9/31/2014','2015 3rd Qtr',

if([Project End]>'10/1/2015' or < '12/31/2014','2015 4th Qtr'))))))))

1 Reply
PrashantSangle

Hi,

Use this,

'Q'& Ceil(Month(DATE)/3) this expression gives you regular quarter

and

if want all dates like [Project End]<'3/31/2014' then it is in 1st Quarter the use following expression

If([Project End]>'3/31/2014','Q'& Ceil(Month([Project End])/3),'1 Q') as Quarter,

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂