Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
Luminary Alumni
Luminary Alumni

Maybe using MonthEnd()?

Not applicable
Author

Thank you I will try this.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

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