Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[Days Open] Scrip calculation

Hi all,
In my script I'm using the following to calculate Days Open.
if
(isnull(tm_last_closed), $(vTodaysDate) , Date(Floor(tm_last_closed))) - Date(Floor(tm_created)) as [Days Open],
the tm_last_closed and tm_created are fields in my database.
I have a request to calculate a backlong for each month based on fixed date instead of $(vTodaysDate) for example using the last date of the month as the point. Then to calculate the Days Open based on the fixed date for  that month.
How can I load fixed dates for each month for example Jan 31 2012, Feb 28 2012, March 31 2012 etc and use it instead of $(vTodaysDate) to compute my Days Open? Please help. Thank you !!!

3 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Maybe using MonthEnd()?

Not applicable
Author

Thank you I will try this.

Jason_Michaelides
Partner - Master II
Partner - Master II

If you want to post some input data and an exaqmple of your desired output chart then we may be able to help you further.

Jason