Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a Variable to get Jan of the selected Year. It works.
vTimeFloor=Date(makedate(Year,1),'MMM YY')
Then I have an expression to return Jan of the previous year. It works.
=date(addyears(Date(makedate(Year,1),'MMM YY'),-1),'MMM YY')
I put the Variable into the formula but it throws error that a ')' is expected
=date(addyears($(vTimeFloor),-1),'MMM YY')
Can anyone please help show me what formatting did I do wrong? This is very small issue but it costs me lots of time.
Many thanks.
Hi Angie,
Try,
=date(addyears(vTimeFloor,-1),'MMM YY')
When there is no selection in Year field or multiple years are in the scope, your expression might not work. Try re-defining your variable , like:
vTimeFloor=Date(makedate(Max(Year),1),'MMM YY')
And then, remove '$' sign when you are calling the function in the expression, like:
date(addyears(vTimeFloor,-1),'MMM YY')
Note:
'$' removal would not be required, if you remove the '=' sign from variable definition. I.e. either remove '=' from variable definition or '$' from variable calling in expression.
I have a Variable to get Jan of the selected Year. It works.
try
Then I have an expression to return Jan of the previous year. It works.
try
I put the Variable into the formula but it throws error that a ')' is expected
try