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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |