Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community.
I have a chart with 6 expressions and I would like to set one expression to only calculate on a condition that the selected Year in the List box equals current year. If the selected year is either greater than or less current year, then it wont calculate.
My conditional expression:
GetCurrentSelections(Year)= Date(Today(),'YYYY')
But I am not getting any results.
any help with getting the right syntax for the expression will be truly appreciated.
Hahahaha, you are right... you should be using GetFieldSelections(Year) instead of GetCurrentSelections 🙂
I am guessing that you year field is created like this in the script
Year(DateField) as Year
May be try this
GetCurrentSelections(Year) = Year(Today())
Thanks for responding,
No, my year is not set up that way in the script.
I tried your suggestion but I got no results...
I have a Date Key which works with the Master Calendar.
Below are my date fields:
LOAD %Date,
Date,
Year,
[Quarter Number],
[Quarter Name],
[Month of Year],
[Month of Year Name],
[Month of Year Abbreviated Name],
[Week of Year],
[Day of Week],
[Day of Week Name],
[Day of Week Abbreviated Name],
[Day of Month],
[Day of Year],
[Days in Month],
Date(MonthStart(Date),'MMM YY') as YearMonth,
[Leap Year Flag],
[Weekend Flag],
[Production Month],
[Production Year],
[Issue Number],
[Julian Date],
[Week Ending Friday]
Can you try this
LOAD %Date, Date, Year(Date) as Year, [Quarter Number], [Quarter Name],
and then this
GetCurrentSelections(Year) = Year(Today())
Still I get nothing. It should be GetCurrentSelections right?
Hahahaha, you are right... you should be using GetFieldSelections(Year) instead of GetCurrentSelections 🙂