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: 
jeevays7
Partner - Creator III
Partner - Creator III

Date selection based on a filed

Hi all,

I have a field the name of "Type" with two values "WTD","MTD".

and i have a "Date" column.

Now i need to select the dates between From Date and ToDate in date column when i am selecting a field value in Type column.

i am assigning from date and to date values in "vFromDate" and "vToDate" variables when you select a field value in "Type"Column.

I write variable event trigger in both variable to select the date. but it is not selecting the dates in Date column.

but the variable is showing the correct date values when i am selecting a value in the type column.

help me.

4 Replies
prma7799
Master III
Master III

You want like this?

jeevays7
Partner - Creator III
Partner - Creator III
Author

Hi P M,

I need the date selection when we selecting a field value.

Ex; in my Type column, i have two values.

if i select MTD, then the date column should select the dates between from month start date to month end date

prma7799
Master III
Master III

Ok .

Could you please share some sample data?

jaumecf23
Creator III
Creator III

Maybe something like this for MTD:

vFromDate : =Min({1<Month={$(vMaxMonth)},Year={$(vMaxYear)}Date)

vToDate : =Max({1<Month={$(vMaxMonth)},Year={$(vMaxYear)}Date)

vMaxMonth : =Month(Max({1}Date#(Date,'YYYYMMDD')))

vMaxYear : =Year(Max({1}Date#(Date,'YYYYMMDD')))