Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi
I have a table with a date issued column , however some of the fields are blank . I would like to use a custom column function to do the following.
If date column - blank return blank else todays date - date issued / 365.24 = date in years (1 decimal point)
Example of table and expected result
| Issue Date | Age in years |
| 01/02/2022 | 0.3 |
| 02/02/2021 | 1.3 |
| 03/02/2020 | 2.3 |
| 09/02/2022 | 0.3 |
| 10/02/2022 | 0.3 |
| 11/02/2019 | 3.3 |
| 12/02/2021 | 1.3 |
| 13/02/2022 | 0.3 |
| 15/02/2010 | 12.3 |
| 15/02/2022 | 0.3 |
| 13/02/2018 | 4.3 |
| 14/02/2017 | 5.3 |
| 15/02/2013 | 9.3 |
| 16/02/2012 | 10.3 |
thank you
Richard
Solved! Go to Solution.
If you have already converted your column to date column, then blanks will be converted to null.
In this case, use below formula
= Number.Round(Duration.Days(Date.From(DateTime.FixedLocalNow())-[Issue Date])/365.24,1)But looks like, you haven't converted the column to date, then you will have to use below formula
= Number.Round(Duration.Days(Date.From(DateTime.FixedLocalNow())-(if [Issue Date]="" then null else Date.From([Issue Date])))/365.24,1)
Perfect work fine thank you 😀
If you have already converted your column to date column, then blanks will be converted to null.
In this case, use below formula
= Number.Round(Duration.Days(Date.From(DateTime.FixedLocalNow())-[Issue Date])/365.24,1)But looks like, you haven't converted the column to date, then you will have to use below formula
= Number.Round(Duration.Days(Date.From(DateTime.FixedLocalNow())-(if [Issue Date]="" then null else Date.From([Issue Date])))/365.24,1)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 7 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 11 | |
| 10 | |
| 9 |