Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

markgraham123
Valued Contributor

Trigger for Date range

Hi all,

I have created the Calendar object to select the date range.

But, when i select the start and end date - start date works fine.

But end date by default selecting the max value.

Can someone pls look into this.

It will be a great help to me.

10 Replies
Highlighted
Partner
Partner

Re: Trigger for Date range

I think the problem is in the Trigger for Field Date, when you clear all selecitions or cliear the list with the Date it Triggers de Action in Setting de vStartDate and vEndDate.

See attached file with two examples

markgraham123
Valued Contributor

Re: Trigger for Date range

Hi,

I used the same settings, but not working.

svenkita
Contributor II

Re: Trigger for Date range

The valued assigned to

vStartDate

vEndDate

is based on the date selected in the list

as you make a selection in the list  you are restricting the value to that one date, hence the min and the max date are the same

make multiple selections on the date list box and see how the 

vStartDate

&

vEndDate

are populated

also add a current selection box to see the values selected

markgraham123
Valued Contributor

Re: Trigger for Date range

Hi Subharaman,

I'm unable to understand what you said.

Can you please elaborate. I have atathced my application too.

Please feel free to have a look.

I'm trying to select the date range arbitarily

svenkita
Contributor II

Re: Trigger for Date range

do the following

right click on the main sheet and say New Sheet Object

and select the current selection box

this will add the current selection box to your sheet

now go ahead and make a selection of date on the Date List box

now the active selection is the single value that you have selected, hence the min and the max function will return the same value

normally for dates we give the user the option to select by month / week / quarter, hence when the user selects the month min  & max function will return the appropriate dates

attached is an example check

markgraham123
Valued Contributor

Re: Trigger for Date range

Hi Friend,

I'm trying to set the date selection from the user point of view as selecting from calendar.

there should be two calendar objects where the data in the sheet will be displayed between the dates selected between them.

svenkita
Contributor II

Re: Trigger for Date range

Check this out

i have removed all the triggers that you have written

the user has to select the start date and the end date from using the calendar given

once this is done the table will filter only the data to match those date, this i have done using the set analysis

i have also changed the list box to work using expressions

hope this helps

markgraham123
Valued Contributor

Re: Trigger for Date range

Hi Subharaman,

Great.

This is what exactly i'm tryin to do.

but i was tryting to do the same with triggers as we may need to change the objects in this sheets by the selections in the calendar objects.

Eager to know how to execute it with triggers.

Maximiliano in his reply did that, but it seems it doesn't work for a dimension.

svenkita
Contributor II

Re: Trigger for Date range

hi

do we really require to do it via triggers.

i have created a new variable vDateSelected (vDateSelected is formed using the vStartDate and vEndDate)

and used this in the expression of the object .. check the expression New Exp

hope this helps