Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal will move to Qlik Community Oct 4. Temporary case outage Oct 3. READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
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))

thanks

1 Reply
Not applicable
Author

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

Regards

Mhatim