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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors