Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
acg
Resolver I
Resolver I

matching dates - except when there are no values

I want to compare date 1 with date 2 and create a new columne indicating whether the two dates are matching or not. 
As such the DAX function below works. But how can I write 'not specified' in the column 'matching', if neither date 1 nor date 2 have a date?
I tried that with not (isblank ..   - but this appeard not to work. Istead the output shows yes - for both cells being empty.  
Any ideas?
 
 
matching =
if(NOT(ISBLANK(Table[Date_1])) = (NOT(ISBLANK(Table[Date_2]))),"Yes","No")
 
date1date2matching yes/no
12.12.202012.12.2020yes
12.12.2020 no
 12.12.2020no
  yes

in this last line we should see 'not specified' instead of 'yes'

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=IF(ISBLANK(Table[Date_1])&&ISBLANK(Table[Date_2]) ,"not specified",IF(Table[Date_1]=Table[Date_2],"yes","no"))

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

=IF(ISBLANK(Table[Date_1])&&ISBLANK(Table[Date_2]) ,"not specified",IF(Table[Date_1]=Table[Date_2],"yes","no"))

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.