The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
81 | |
74 | |
42 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |