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

Comparison of dates in an expression

Hello,

I have an inline table that has the start date and end date of the company quarters and need to compare the quarter from the database record to the quarter of the inline table. Is it possible to do that in an expression in Qlikview?

This is what I have but it does not work.

StartQuarter is from the database record, StartDate and EndDate is from the inline table. I am trying to compare today's date to the StartDate and EndDate to determine if the quarter is greater or lesser.

=If(Status='NotStarted' and (StartQuarter < (today() >= StartDate and today() <= EndDate)), RGB(255,0,0))

Any suggestions? Thanks.

2 Replies
MarcoWedel

maybe

=If(Status='NotStarted' and today() >= StartDate and today() <= EndDate and StartQuarter < QuarterStart(StartDate), RGB(255,0,0))


depending on your data structure.

Please post sample data and more detailed description to clarify.


hope this helps


regards


Marco

Not applicable
Author

Thanks, Marco.

The image of the inline table is attached and the columns are FY, Quarter, StartDate , EndDate.

Inline table.jpg

From the database, for the fields, below are the values:

Start Quarter = 1, 2, 3, 4, Next Year, TBD

End Quarter = 1, 2, 3, 4, Next Year, TBD

I created a field 'Quarter' to eliminate the non-integers.

If(IsNum(StartQuarter),StartQuarter,0) as "Quarter"