Code: Select all
{IIF(DayOfYear(DateSerial(Year(Today), Month(EMPLOYEES.DATEOFBIRTH), Day(EMPLOYEES.DATEOFBIRTH))) >= DayOfYear(Today),
DayOfYear(DateSerial(Year(Today), Month(EMPLOYEES.DATEOFBIRTH), Day(EMPLOYEES.DATEOFBIRTH))) - DayOfYear(Today),
DaysInYear(Today) - DayOfYear(Today) + DayOfYear(DateSerial(Year(Today) + 1, Month(EMPLOYEES.DATEOFBIRTH), Day(EMPLOYEES.DATEOFBIRTH))))}
I would like to display how many days are left until the next birthday in a bar chart or with sparklines. I assumed that you could load the corresponding value from a variable. I do not have this value in a database; it has to be calculated – see the expression. Is there another way to achieve this?