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
THENNA_41
Post Partisan
Post Partisan

compare two columns

I have Global POL table, trying to Compare the two column  CBL and CBL LOCAL  .If both column value same its return  true. if values not match and both column blank its return False. i have tired the below measure . 

 

True/False =
IF (
    'Global POL'[CBL]= 'Global POL'[CBL Local],
    "True",
   "False"
   
)

 

INPUT :

 

   ID                  CBL                                                  CBL LOCAL 

  122         MS14-CA04CAS002                     MS14-CA04CAS002

  123        MS14-CA04CAS004                     MS14-CA04CAS004 

  124        MS14-CA04CAS004                     MS14-CA04CAS002 

  125

 

EXPECTED OUTPUT:

 

   ID                  CBL                                                  CBL LOCAL                         TRUE/FALSE

  122         MS14-CA04CAS002                     MS14-CA04CAS002                          TRUE 

  123        MS14-CA04CAS004                     MS14-CA04CAS004                           TRUE 

  124        MS14-CA04CAS004                     MS14-CA04CAS002                           FALSE

  125                                                                                                                        FALSE

5 REPLIES 5
KeyurPatel14
Responsive Resident
Responsive Resident

Hii @THENNA_41 ,
Please enter below formula:

KeyurPatel14_0-1674022700451.png

 

KeyurPatel14
Responsive Resident
Responsive Resident

Hii @THENNA_41 ,
Please try below formula:

KeyurPatel14_0-1674022486742.png

 

KeyurPatel14
Responsive Resident
Responsive Resident

Hii @THENNA_41 ,
Can you please try following measure:

KeyurPatel14_0-1674021297665.png

I have taken this as a sample data so apply this formula to your data and if this helps you then accpet this as a solution and give a thumbs up.

Mahesh0016_0-1674022984295.png

Compare =
 IF (
    Compare[CBL            ]=Compare[Column1] && AND(Compare[CBL            ]<>BLANK() , Compare[Column1]<>BLANK()),
    "True",
   "False"
   
)

 

@KeyurPatel14  if both column blank its also False 

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!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.