Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
Is there any way for qlik sense to always show data for the last 7 days when opening the dashboard in a simple way?
I have a date field (s_date_open) in the format:
17.11.2022 16:00
17.11.2022 19:05
18.11.2022 11:00
etc.
and a filter: Date(FLOOR(s_date_open,'DD.MM.YYYY')) that outputs all unique dates without time.
My solution was to manually select the last 7 dates in the filter and bookmark it, but then later when refreshing the data, it will display not the last 7 days, but the selected ones, so is it possible to do this automatically?
Tried to make a calendar vizlib, but it does not want to work as a filter.
Follow below steps:
1. create a calendar for max(date) - 7 date values and duplicate the calendar field and give it a different name (eg. date_for_selection)
2. in sheet actions, select "select all values in a field" from dropdown
3. choose newly created date field (date_for_selection) from fields dropdown.
Now everytime sheet is opened, by default latest date and past 7 dates will be selected.
Regards,
Aditya
You could try to filter your date field using an expression. When the filter is active create a bookmark. Make that bookmark a default bookmark, then it will be applied every time an user opens the application.
Your selection search could look something like this.
=s_date_open >= Max(total s_date_open) - 6 AND s_date_open< Max(total s_date_open)
Follow below steps:
1. create a calendar for max(date) - 7 date values and duplicate the calendar field and give it a different name (eg. date_for_selection)
2. in sheet actions, select "select all values in a field" from dropdown
3. choose newly created date field (date_for_selection) from fields dropdown.
Now everytime sheet is opened, by default latest date and past 7 dates will be selected.
Regards,
Aditya
Thank you so much, I’ll try this one tomorrow and report back
You could try to filter your date field using an expression. When the filter is active create a bookmark. Make that bookmark a default bookmark, then it will be applied every time an user opens the application.
Your selection search could look something like this.
=s_date_open >= Max(total s_date_open) - 6 AND s_date_open< Max(total s_date_open)
Aditya, I'm sorry, I'm not sure I understood the first point correctly.
Do I understand correctly, that I create a calendar widget on the sheet, where I write in the selection field - max(s_date_open) - 7 date values, which I then duplicate in the script under a different name?
thank you,
Julia
just the first part should suffice in this case
=s_date_open >= Max(total s_date_open) - 6
I guess @Vegar 's solution is more convenient. Just use: =date>=max(total date)-6 in date filter and create a bookmark and in sheet actions select apply bookmark if you want it to be activated only when specific sheet is opened. otherwise set it to default
Regards,
Aditya