Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Vizlib default date

Hi!

I use the Vizlib calendar extension in an app.

I want the app when open to present data for the previous 5 days .

I use the "Initial Selection" and can set a "Initial Start Date".

What should the formula be in order to present the previous 5 days?

25 Replies
Highlighted
Creator
Creator

Hey, I had this same question once and I ended up using the extension below along side the vizlib calendar.  It sets your date field to whatever selection you want. Mine does max date, but you can change it to select multiple.

https://github.com/mediassarQlikBranch/SimpleFieldSelect

Right now, they have been working on the default dates of the calendar. Maybe they have recently fixed it, but I don't know. mahlerma‌ Did you guys get that default date setting fixed yet?

Highlighted
Creator
Creator

Hi!

I tried to use '=(Max([Date], 5))'.

I also tried to use Vizlib Filter using the same expression Doesn't work.

Highlighted
Partner
Partner

Hi Stefan,

Vizlib is a 3rd party extension library which is *supported*, I'd recommend sending an email to support@vizlib.com with your enquires and someone from the support team will definitively help you out.

Best,

David

Highlighted
Master II
Master II

Hi stefan,

Try setting the right format as your Date field format, assuming you date format is DD/MM/YYYY

=date(Max([Date], 5),'DD/MM/YYYY')


Br,

KC

Best Regards,
KC
Highlighted
Creator
Creator

Try this,

Datefield=Today()-5

Highlighted
Creator
Creator

Hi!

i tried this in both Vizlib Calender and Filter but it doesn't work.

If I use '=(Max([Date], 5))' I receives the 5:th day from today but not the range of the previous 5 days

Highlighted
Creator
Creator

sum({<DateField={"<=$(=max(date(addmonths(DateField, 0))))>=$(=max(date(addmonths(DateField, 0)-5)))"}>} Measure)

Highlighted
Creator
Creator

Hi again!

i tried this in both Vizlib Calender and Filter but it  still doesn't work

Highlighted
Master II
Master II

Hi Steffen,

Have you tried the ""Add Date Range" option in vizlib calendar ?


You can create a last 5 days selection range.


Vizlib

See section 3.5

Br,

KC

Best Regards,
KC