Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a date field called [date] and i need to keep this field in filter and current month as default selection in bookmark. i want date filter all values in the sheet. but it should show current month as default selection .
You can try to make this selection, and after this create your bookmark :
{<[Date]={"=[Date]>=monthstart(Today()) and [Date] <= monthend(today())"}>}
Enjoy your Qlik.
Kind regards,
Théo ATRAGIE.
The solution provided will certainly help you, but it's just a second option if you have a month field derived from Date or if you can create a Month field. This can also be useful.
{<FieldMonth={"=FieldMonth=Month(Today())"}>}
- Regards, Matheus
The issue with :
{<FieldMonth={"=FieldMonth=Month(Today())"}>}
is that it only looks at the month (1 to 12), without considering the year.
If your dataset covers multiple years, you will get all records from the same month regardless of the year (e.g., July 2024, July 2023, July 2022, etc.).
🔧 To fix this, you also need to filter on the current year:
{<
FieldMonth={"=FieldMonth=Month(Today())"},
FieldYear={"=FieldYear=Year(Today())"}
>}
FieldMonth = month number
FieldYear = year number
This way, only the rows where both the month AND the year match Today() will be selected.
Thanks for this @theoat
I ended up just going with the scenario I'm currently in, here Max(Year) is already filtered.
But you are right with your correction considering that we do not know the real scenario.
There is a solution, and not just one, that's for sure, haha. I'd even say with a Month/Year field if necessary.