Skip to main content
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

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

tresesco
MVP
MVP

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

tresesco
MVP
MVP

Could you post your sample qvw?