Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a dataset loading into a Qlickview table from SQL, but would like the user to have the option of selecting a date range to filter this on.
I.e. A table of people records that started between DateA and DateB, where the user has the option to enter these date ranges into two separate calendar/slider objects.
E.g. Start Date >............ Start Date <.................... (calendar/slider objects at top of form).
Thanks in advance.
After full load of your table you can use the calendar object to select the StartDate and EndDate by the help of the calendar object with the help of the variables
Eg:-
Suppose this is table
Load
Date
...
From Location;
MaxMinDates:
Load Max(Date) as MaxDate, Min(Date) as MinDate Resident Table;
Let vMinDate = Date(FieldValue('MinDate',1),'D/M/YYYY');
Let vMaxDate = Date(FieldValue('MaxDate',1),'D/M/YYYY');
After this create two calendar objects for min date in the first caledar object select vMinDate variable or in second calendar select vMaxdate simultaneously.
I use:
=Sum({$<Date = {'>=$(#vStartDate)<=$(#vEndDate)'}>} sales)
vStartDate and vEndDate are variables the user selects from a Calendar Object.
hth,
Stephen
Hi thanks for the feedback.
Could you tell me where I would plug that formula into my table?
I've managed to get this working in Pivot tables before by using that line in the expression value, but can't see where I'd do this in a table?
Thanks
This needs to go in any of our expressions.
Thanks for this info.
I understand the concept of using variables and have been able to do this successfully using a pivot table and editing the expression, however I am now trying to filter a table dataset based on dates. As far as I can see the table doesn't have any expression field, so not quite sure how I would do this?