Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have come across a small problem. I have a set of data and am attempting to display the data for the previous year-to-date.
I have only one filterable data set (YEAR).
The problem I am having is with the actual commencement date.
To explain further. I use set analysis to set the filterable data set year to YEAR-1 (no problem I can see the entire previous year's data).
When I try to view YTD I get no values.
To bypass this I can use an IF statement to search for positive values for each commencement period this year and relate this back to the previous year's commencement dates. This works as long as there is a positive value in the current year's date period. This is not always the case though. When the current period is zero I still want to see the previous YTD period.
Sample script as follows:
COUNT ({$<YEAR={$(=YEAR-1)}>}DISTINCT(IF(TERM_START<=vPERIOD, ENROLLED)))
Where variable vPERIOD = Current date period (dd/mm) + YEAR-1
Any advice would be greatly appreciated.
Thanks
Karl
Hi,
Use this Expression.......
vPERIOD=Addyear(Max(TERM_START),-1)
Count({<YEAR={$(#=Max(YEAR)-1)}>}DISTINCT(IF(TERM_START <=vPERIOD,ENROLLED)))