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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Calculated Column to check same value or not

Hello experts,

I wanted to create a calculated column where:

 

if Column A = Column B, display 1. else 0.

 

but the issue is, sometimes both column are "Blank", so it will detect as the same, so it will display as 1, not 0.

i want if both blank, display 0.

 

Really need your help on this.

 

Thanks in advance.

Zety

4 ACCEPTED SOLUTIONS
Mahesh0016
Super User
Super User

@Anonymous i hope this helps you!THANK YOU!!

Match =
VAR A = IF(ISBLANK('Table'[Id]),1,'Table'[Id])
RETURN
IF(A=='Table'[Index],1,0)

Mahesh0016_0-1686641537218.png

 

View solution in original post

ddpl
Solution Sage
Solution Sage

try this

 

Column = IF('Table'[ID] == BLANK() || 'Table'[Index] == BLANK() , 0,

                 IF('Table'[ID] = 'Table'[Index] , 1 , 0))

View solution in original post

mahenkj2
Solution Sage
Solution Sage

Hi @Anonymous 

 

Please check below:

Revised =
IF (
    AND ( ISBLANK ( Tables[Id] ), ISBLANK ( Tables[Index] ) ),
    0,
    IF ( Tables[Id] = Tables[Index], 1, 0 )
)

 

Hope it helps.

View solution in original post

mahenkj2
Solution Sage
Solution Sage

Hi @Anonymous 

 

Or in your column terms, it would be:

Revised =
IF (
    AND ( ISBLANK ( Tables[Column A] ), ISBLANK ( Tables[Column B,] ) ),
    0,
    IF ( Tables[Column A] = Tables[Column B,], 1, 0 )
)

 

Hope it helps.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

THANK YOU ALL !! YOU GUYS ARE AWESOME! APPRECIATE IT ! :)))))

mahenkj2
Solution Sage
Solution Sage

Hi @Anonymous 

 

Or in your column terms, it would be:

Revised =
IF (
    AND ( ISBLANK ( Tables[Column A] ), ISBLANK ( Tables[Column B,] ) ),
    0,
    IF ( Tables[Column A] = Tables[Column B,], 1, 0 )
)

 

Hope it helps.

mahenkj2
Solution Sage
Solution Sage

Hi @Anonymous 

 

Please check below:

Revised =
IF (
    AND ( ISBLANK ( Tables[Id] ), ISBLANK ( Tables[Index] ) ),
    0,
    IF ( Tables[Id] = Tables[Index], 1, 0 )
)

 

Hope it helps.

ddpl
Solution Sage
Solution Sage

try this

 

Column = IF('Table'[ID] == BLANK() || 'Table'[Index] == BLANK() , 0,

                 IF('Table'[ID] = 'Table'[Index] , 1 , 0))
Mahesh0016
Super User
Super User

@Anonymous i hope this helps you!THANK YOU!!

Match =
VAR A = IF(ISBLANK('Table'[Id]),1,'Table'[Id])
RETURN
IF(A=='Table'[Index],1,0)

Mahesh0016_0-1686641537218.png

 

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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