Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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!
Solved! Go to Solution.
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.
please show your model and some sample data
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.
When i use the measure i don't get a response, see image
Age =
VAR SelectedDate = SELECTEDVALUE(DateTable[Date])
VAR SelectedDOB = SELECTEDVALUE(Employees[DOB])
RETURN DATEDIFF(SelectedDOB, SelectedDate, YEAR)
User | Count |
---|---|
82 | |
72 | |
67 | |
47 | |
36 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |