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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors