Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All
I have two Columns. Date of Birth and Current Date. I have applied a simple formula in 3rd Column Age=[Current date]-[Date of Birth] I found the result in Date format. Now I want to convert 3rd column in number of days or number of years
Basically I want to calculate age in years in 3rd Column of 4th Column using the 3rd Column Information.
Best Regards
Rashid Anwar
Solved! Go to Solution.
Hi @rashid0146,
you can use datediff function in 3rd column only for finding the difference in years.
DATEDIFF(dateofbirth, currentdate, year)
Reagrds
Hi @rashid0146
can you below dax function to calculate difference between two date
Difference = DATEDIFF(<start_date>, <end_date>, <interval>)
For your case, use
Days = DATEDIFF(tablename[Date of birth], Today(),Days)
you will get days here.
By
Gnanasekar
Hi @rashid0146
can you below dax function to calculate difference between two date
Difference = DATEDIFF(<start_date>, <end_date>, <interval>)
For your case, use
Days = DATEDIFF(tablename[Date of birth], Today(),Days)
you will get days here.
By
Gnanasekar
Hi @rashid0146,
you can use datediff function in 3rd column only for finding the difference in years.
DATEDIFF(dateofbirth, currentdate, year)
Reagrds
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
96 | |
79 | |
66 | |
62 |
User | Count |
---|---|
145 | |
113 | |
105 | |
85 | |
65 |