quotient
2 TopicsCalculation of year of retirement
Being new to DAX, I researched various calculations of the age although I was specifically after calculating the year of retirement for a large dataset so that I could chart the staff demographics and profile. I found the suggestion from Marco Russo (thank you Marco!) of the QUOTIENT method, which gives an accurate calculation of the age, and modified this to calculate the year of retirement as per the below. I hope you find this useful and if there are any enhancements, please do let me know. Year of Retirement = -- Please change the next variable from 65 to your organisation's retirement age VAR RetirementAge = 65 VAR Birthdate = [Date of Birth] VAR ThisDay = DATE(YEAR(TODAY()), 12, 31) VAR IntBirthdate = YEAR ( Birthdate ) * 10000 + MONTH ( Birthdate ) * 100 + DAY ( Birthdate ) VAR IntThisDay = YEAR ( ThisDay ) * 10000 + MONTH ( ThisDay ) * 100 + DAY ( ThisDay ) VAR Age = QUOTIENT ( IntThisDay - IntBirthdate, 10000 ) VAR CheckedAge = DIVIDE ( Age, NOT ISBLANK ( Birthdate ) ) VAR YearstoRetirement = RetirementAge - CheckedAge VAR ExpectedRetirementYear = YEAR(TODAY()) + YearstoRetirement RETURN ExpectedRetirementYear587Views2likes1CommentQUOTIENT rerurns 0 when it should not
Hi all, I have a problem with DAX functions QUOTIENT. I have "minutes spent fact" column and I want to convert it to "X day, Y hours, Z mins" format. My first step is to divide "minutes spent fact" by 60 to convert minutes to hours I'm using QUOTIENT function. Here what it returns QUOTIENT (1320, 60) should return 22. Am I right? or I get the wrong idea of this function... Here are other screen with some wrong zero resultsSolved738Views0likes1Comment