Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have some tables in a report which shall only show the data for the next 7 days.
=week(now())+1
isn't working. I've tried different writings. Put the +1 on different locations. Tried something with days +7... The report always says "Invalid selections"
Any Ideas?
Thanks in advance!
It is hard to give you an answer without knowing how the field you are trying to filter on is created in Qlik Sense script. Do you use some sort Floor() and Date() functions to make sure there no timestamps on date field?
Also week(now())+1 is not really good approach as it will not give you right result. Using now() finction is also not right as it returns timestamp (date and time) which also is not what you need.
Lets just assume that you need to filter based on "MyDate" field which is create in script using
...
Date(Floor(SomeDate)) as MyDate
...
now... The fact that we applied Date() mask on numerical value of the date does not mean anything... we still need to apply numerical filter...
to achieve this you would use:
Option 1: https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/
Option 2: https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/
Thats it
hope this helps