Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need to get Date between 1 Jan to 31 Dec of current year only and this to be used as DIM in expression.
without use of back-end script.
Except below expression
If(Date>=YearStart(today()) and Date<=YearEnd(today()), Date)
Would you be able to provide more details as to what all have you already tried and what is the issue so far?
I have tried below expression and its working fine.
If(Date>=YearStart(today()) and Date<=YearEnd(today()), Date)
Issue is date field has last 10 year data and as per requirement 1 chart need to show current year data.
This needs to be done via expression but not from backend scripting.
shared expression is bit performance impacting that is causing an issue.
Create a flag for current year in the script
If(Year(Date) = Year(Today()), 1, 0) as CurrentYearFlag
and then use this in your expression
Sum({<CurrentYearFlag = {'1'}>}Measure)