Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm facing an issue with a variable in my chart. It's being interpreted as an operation instead of a string label.
Here's what I'm trying to achieve:
I want to display the year range like "2019/2020", "2020/2021", and so on.
In the variable editor, here's my formula:
=if(Month(Today())>=4, (Year(Today()))&' / '&(Year(Today())+1), (Year(Today())-1)&' / '&(Year(Today())))
I've tried adding the Text function, but it's still not working as expected and keep getting interpreted as a division operation.
Any suggestions on how to fix this?
Thanks in advance for your help!
IF are you using a Variable for the Dimension! then remove the leading = sign from the variable definition that will fix it
Or you can just use YearName() function as below
=YearName(today(),0,4)
Or
=Replace(YearName(today(),0,4),'-','/')
IF are you using a Variable for the Dimension! then remove the leading = sign from the variable definition that will fix it
Or you can just use YearName() function as below
=YearName(today(),0,4)
Or
=Replace(YearName(today(),0,4),'-','/')
Thanks Vineeth.
Works like a charm !
I used Replace(YearName(today(),0,4),'-','/') as suggested.