I have two columns effective from and current position. i want to compute a colum of duration which will let us know the duration of a person designation. for example the duration of "assistant manager" will be 2 year and duration of "head" will be 8 years and 2 months. how can we find it through DAX.
Thnaks in advance
Solved! Go to Solution.
Hi @HassanAli123 ,
You can use DATEDIFF function here.
Eg - Result_for_years = DATEDIFF(effective_form, Today(), Year)
(for first row, this will return no. of years between 01/01/2012 to today's date)
Result_for_months = DATEDIFF(effective_form, Today(), Month)
(for first row, this will return no. of months between 01/01/2012 to today's date)
Result_for_days = DATEDIFF(effective_form, Today(), Day)
(for first row, this will return no. of days between 01/01/2012 to today's date)
@HassanAli123 -> Please mark this as a solution if it helps you. Thank you.
actually you did not get my point. the person is same in both designation. i want to calculate duration separately for assistant manager it should calculate till 2014 mean 2 years and 8 year 2 months for head roll
Click here to learn more about the September 2022 updates!
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.
Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!