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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Koliberus
Frequent Visitor

Comparison of two columns passing on BLANKS

Hello, 

I created column with measure below for comparing two others columns:
Valid mails check = IF(EXACT('DATA1'[Mails], 'DATA2'[Mails]),1,0)

DATA1MailsDATA2MailsValid mails check
user1@mail.comuser1@mail.com1
user2@mail.comuser3@mail.com0
user5@mail.comuser5@mail.com1
blankblank1

The problem is that it also compares blank rows from both columns DATA1 and DATA2 and shows them as "1".
How can I exclude it and force to show "0" for exact blank values?

 

Best regards, 

Patrick

 

1 ACCEPTED SOLUTION
saravanan_p
Resolver III
Resolver III

excude blanks in the filter level or give a condition in dax for not to comoare blanks, else if blank matches with blank then make it 0. It has to written in dax.
if(not(blank(DATA1'[Mails]),

     IF(EXACT('DATA1'[Mails], 'DATA2'[Mails]),1,0)
     ,0)

Hope this clears your query, kindly mark it as solution 

 

View solution in original post

3 REPLIES 3
saravanan_p
Resolver III
Resolver III

excude blanks in the filter level or give a condition in dax for not to comoare blanks, else if blank matches with blank then make it 0. It has to written in dax.
if(not(blank(DATA1'[Mails]),

     IF(EXACT('DATA1'[Mails], 'DATA2'[Mails]),1,0)
     ,0)

Hope this clears your query, kindly mark it as solution 

 

Thank You so much! Great help 🙂
Have a realy good day


Best Regards, 
Patrick

@saravanan_p Perfect, well explained.
@Koliberus hence the solution, mark it so that users help the community

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.