Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue in YTD exp

Hi all,

When I try to give the following expression for the calculation of previous year ytd value, I get the result as 0.

can you please help me out in finding where the issue is?

thanks in advance

 

[Date] = {">=$(=YearStart(vCalendar)-1)"}*{"<$(=Date(MonthStart(vCalendar)-1,'DD/MM/YYYY'))"},

vcalendar is nothing but today()-1

Thanks & Regards,

Vidhya

Labels (1)
5 Replies
Not applicable
Author

Hi, Please add the New field Called YEAR in the data model and use the below expression :

YEAR = {"$(=Yeay(Todat())-1)"}

Not applicable
Author

Hi,

I am comfortable with writing script for year, but I face few issues when I do the same for month.

I want to display Jan to Jul months of 2013 using variable, and it should automatically get changed to Jan to Aug 2013 when we are in September.

Hope I am clear.

Thanks and Regards,

Vidhya

tresB
Champion III
Champion III

First glance says about few corrections, try like:

[Date] = {">=$(=YearStart(vCalendar)-1) <$(=MonthStart(vCalendar)-1)"},

Not applicable
Author

Hi,

Expression doesn't seem to work. I get 0 as the result

Thanks,

Sheela

tresB
Champion III
Champion III

Could you post your sample qvw?