Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
stekol61
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
groveliam
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?

stekol61
Creator
Creator
Author

Hi!

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

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

anguila
Partner - Creator
Partner - Creator

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

jyothish8807
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
priyalvp24
Creator
Creator

Try this,

Datefield=Today()-5

stekol61
Creator
Creator
Author

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

priyalvp24
Creator
Creator

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

stekol61
Creator
Creator
Author

Hi again!

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

jyothish8807
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