Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Conditional Let

Hi i need some help to check the current month and then give to a variable a date.

if the month is the first 1 then the variable should go back 1 year , in the end of the 12th month

else point previus  monthend.

if today is 2013-01-18 variable should give 2012-12-31

if today is 2013-02-01 variable should give 2013-01-31

Is it possible to do this on the scpirt , to compine if with let ?

if (Month(Today())=1, LET vYTDEndD_LY= MakeDate(Year(Today())-1,MonthEnd(Month(12))), LET vYTDEndD_LY= MakeDate(Year(Today())-1,MonthEnd(Today())-1))


1 Reply
Not applicable

Re: Conditional Let

Use this date(MonthEnd(AddMonths(today(),-1))) as <Fieldname>

This can also be used in any chart that you might be making

Hope this helps