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
I would like to calculate years between two date columns, one is "StartDate" and the other "EndDate".
EndDate has blanks and I would like to use a specific date as blank substitute: "2016-12-31"
I know it is something like: IF( ISBLANK( in combination with DATEDIFF but I can't figure out how to write it.
Thank you!
Solved! Go to Solution.
@Anonymous Try:
Column = IF([EndDate] = BLANK(),DATEDFF([StartDate],DATE(2016,12,31)),DATEDIFF([StartDate],[EndDate]))
@Anonymous Try:
Column = IF([EndDate] = BLANK(),DATEDFF([StartDate],DATE(2016,12,31)),DATEDIFF([StartDate],[EndDate]))
Thank you very much! It worked perfect with interval argument as YEAR.
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 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 18 | |
| 14 | |
| 14 |