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

Date problem

Hi All,

I am new to Qlikview so excuse me if this question is really simple.

I have used following function which seems to work quite well:

If([Revised Due Date]<=today()-61,[Line Debt],0)

I tried to replace today's date with the specific date or end of the month date but it doesn't give me correct results.

Could you please help??

1 Solution

Accepted Solutions
kristoferahlin
Partner - Contributor III
Partner - Contributor III

The problem is most likely with the date format. You might want to try something like:

If([Revised Due Date]<= Date(Date#('30/11/2014', 'DD/MM/YYYY')-61, 'DD/MM/YYYY'),[Line Debt],0)

You might want to consider putting end of month in a variable, like vMonthEnd = MonthEnd(Today()). Then use that variable in your expression.

View solution in original post

4 Replies
MK_QSL
MVP
MVP

how you tried? Can you post the expression pls?

Not applicable
Author

I have tried:

If([Revised Due Date]<=30/11/2014-61,[Line Debt],0)

and all sort of combinations with monthend expreccion.

kristoferahlin
Partner - Contributor III
Partner - Contributor III

The problem is most likely with the date format. You might want to try something like:

If([Revised Due Date]<= Date(Date#('30/11/2014', 'DD/MM/YYYY')-61, 'DD/MM/YYYY'),[Line Debt],0)

You might want to consider putting end of month in a variable, like vMonthEnd = MonthEnd(Today()). Then use that variable in your expression.

Not applicable
Author

Thank you very much for your help.

I've been trying to work it out myself for two days

It pays off to ask for help.