Forum Discussion
Danny-Happy
2 years agoHelper I
Age based on selected date
Hi All,
I want to see the age of our employees on a chosen date in a filter(so not today).
I got a table with employee name an DOB and a calender table.
Which measure should I use?
Many thanks!
thx, you have to remove the relationship between Date and DOB. Otherwise Date filters Employee and shows only the people that had a birthday ON THE SELECTED DATE.
5 Replies
- lukiz84Memorable Member
Age = VAR SelectedDate = SELECTEDVALUE(DateTable[Date]) VAR SelectedDOB = SELECTEDVALUE(Employees[DOB]) RETURN DATEDIFF(SelectedDOB, SelectedDate, YEAR) - Danny-HappyHelper I
When i use the measure i don't get a response, see image
- lukiz84Memorable Member
please show your model and some sample data
- lukiz84Memorable Member
thx, you have to remove the relationship between Date and DOB. Otherwise Date filters Employee and shows only the people that had a birthday ON THE SELECTED DATE.