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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.