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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.