Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
george55
Partner - Creator III
Partner - Creator III

FirstWorkDate calculating backwards

Hi all,

Have this formula in the load script:

If(TimeStampField > FirstWorkDate(Today(), 1, $(Holiday)), '-1 Day',  ....

TimeStampField will be used in a filter pane. Output of this formula is (let's say today is March 18) all data from March 18. What I need is all data from March 17. That means Today - 1 Day = March 17. March 18 should be skipped. If I use this formula:

If(TimeStampField > FirstWorkDate(Date(Today() -1), 1, $(Holiday)), '-1 Day',  ....

then got as result all data from March 17 and 18. How can I avoid the todays date (March 18)? Need only days from March 17.

Thanks.

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
george55
Partner - Creator III
Partner - Creator III
Author

Find the solution.

When using a '<>' then the values on both sides must have the same value. Timestamps are not suitable for that. Adjusting the values on both side with Floor() helped.

View solution in original post

4 Replies
sunny_talwar

Not sure, but may be this

If(TimeStampField > FirstWorkDate(Date(Today() -1), 1, $(Holiday)) and TimeStampField <> Today(), '-1 Day',  ....

george55
Partner - Creator III
Partner - Creator III
Author

Good idea, but unfortunately have the same result.

sunny_talwar

Would you be able to share a sample where we can see the issue

george55
Partner - Creator III
Partner - Creator III
Author

Find the solution.

When using a '<>' then the values on both sides must have the same value. Timestamps are not suitable for that. Adjusting the values on both side with Floor() helped.