Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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)
Master II
Master II

Capture.PNG

Capture.PNGHi Try like this:

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

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));