Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This is Varun.
I actually have a small question. I have created 4 variables,
1. vpresentyear=(addmonths(date(now()),-((year(now() )-Year)*12)))
2. vstartyear=YearStart(vpresentyear)
3. vpreviousyear=(addmonths((vpresentyear),-12))
4. vpreviousstartyear=YearStart(vpreviousyear)
My requirement is to get data between (vstartyear and vpresentyear ) and (vpreviousstartyear and vpreviousyear) using the variables.
My code for Present Year-to_date is:
= count({<CREATION_DATE1 = {">=$(=vstartyear)<=$(=vpyear)"}>}PO_LINE_LOCATIONS_ALL.QUANTITY)
My code for Present Previous Year-to_date is:
= count({<CREATION_DATE2 = {">=$(=vprevstartyear)<=$(=vprevyear)"}>}PO_LINE_LOCATIONS_ALL.QUANTITY)
I am getting values for Present Year-to_date, but Previous Year-to_date is showing as '0'.
Can anyone please help me...!!
why CREATION_DATE2? and also the variables are changed in the expressions
maybe
= sum({<CREATION_DATE1 = {">=$(vpreviousstartyear)<=$(vpreviousyear)"}>}
PO_LINE_LOCATIONS_ALL.QUANTITY)
I tried taking creation_date, it is showing Previous YTD as '0'.
So I have mentioned
date(CREATION_DATE) as CREATION_DATE1,
date(AddYears((CREATION_DATE),-1)) as CREATION_DATE2.
For this I am getting same data for both Present YTD and Previus YTD
Please ping me, if there are any doubts in the question.
Thanks & Regards,
varun