Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

A complicated puzzle with time

I have a challange that I don't know how to solve.

When you select a year/month/.. in qlikview you get the data for that year/month/..

But I need to have all the date up to that month, how do I contrive this?

Perhaps working with a from -to selection box where the user chooses the time period, but I do not know how this should work.

An additional difficulty is that I have several dates, each sheet in my document is built around a different datefield.

Any ideas?

Kind regards,

Katleen

3 Replies
sasikanth
Master
Master

hi,

For the First one try something like below

sum({<Year={"<=$(=vMaxYear)"},Date={'<=$(vMaxDate)'}}Value)

it will some up to the selected year

datanibbler
Champion
Champion


Hi,

I guess if all your worksheets have some time-dimension, then it would be a good idea to have a master_calendar that all your worksheets can link to, that way you can basically make selections that will be valid everywhere - if you want that, otherwise you can build in triggers to remove them whenever you change sheets.

Then maybe you can create a small Inline_table - or a RESIDENT LOAD from your master_calendar - and rename it END_MONTH or so - important is that it is not linked - and then add a trigger that will select on the "real" month_field with the correct search-expression.

HTH

Best regards,

DataNibbler

tresesco
MVP
MVP

You can use MonthEnd() to get data till that month in the set analysis, something like:

=Sum({<Date={"<=$(=MonthEnd(Date))"}>} Amount)

If you select a date it would give you data summation till the end date of the month the selected date belongs to.

For several date fields issue, you better maintain a master calendar table in the script which would be a link table to several date fields from various tables. Refer :canonical-date