Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
prees959
Creator II
Creator II

Button Action to Select last 3 Full Months

Hi,

In my load script I am creating these variables :

vLast3MonthStartDate=Monthstart(today(),-4);

vLastMonthEndDate=MonthEnd(Today(),-1);

I have a date field in my data called [Date]

I am trying to select the last 3 full months of data using this action on a button click :

= '>=' & $(vLast3MonthStartDate) & '<=' & $(vLastMonthEndDate)

But it doesn't seem to select anything.

I am clearing Date as the first action

Can anyone help?

Thanks,

Phil

3 Replies
Anil_Babu_Samineni

Try this?

= '>=' & vLast3MonthStartDate & '<=' & vLastMonthEndDate

Or

= '>=' & $(=vLast3MonthStartDate) & '<=' & $(=vLastMonthEndDate)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
qlikviewwizard
Master II
Master II

Capture.PNG

Capture.PNGHi Try like this:

SUM({< DATE={"$(='>=' & $(vLast3MonthStartDate)& '<=' & $(vLastMonthEndDate))"}>}SALES)

sushil353
Master II
Master II

hi,

Check your date field format and your variable format. you can change the format using date function..

vLast3MonthStartDate=Date(Monthstart(today(),-4));

vLastMonthEndDate=Date(MonthEnd(Today(),-1));