Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am interested in having two calendar objects that would then create variables. The goal of this is to compare fields across a set of dates. Therefore, I would like the first calendar object to set the first date while the second creates another variable for the second date.
Any thoughts on how I could get this to work?
Thank you!
You don't need to create variables for this. You need only two variables like vStart and vEnd and use them within your calendarbox (with min/max-date + date-formats). Then you have two options - one is to use an field-selection action triggered by changes on the variable and the other ist o use set analysis filter within your expressions like:
sum({< Date = {">='$(vStart)'<'$(vEnd)'"}>} AnyValue)
This is slightly different but I think it's helpful, too: Selecting Arbitrary Date Ranges - YouTube
- Marcus
Let's say I have a field "Year", which I use as my calendar selection field.
How do I use what is selected in each calendar object in an expression or as a field in a table I create?
In other words. I want to select from a set of dates in the calendar and have what ever date I select be a variable.
I believe you are thinking this too complicated - qlikview has (regulary build) an associative datamodel by which all data are linked per key-fields. If you made a selection all available data are then included within the views and calculations (unless you used advanced techniques like alternate states or set analysis). A good starting point is this here: Get started with developing qlik datamodels
If you want to compare data against various time-periods then you should use a master-calendar and create flags for these periods, many examples to these topics could you find here: How to use - Master-Calendar and Date-Values.
- Marcus