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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Picking the same value from 2 columns under the same table

Hello Guys

 

I need your help

I need to create a new column, searching one specific value in two different columns in the same table and bringing a value like 1 or 0

Ideally, it should be something like below:

 

Column = SEARCH("client1",[Column X ],1,0) || SEARCH("client1",[Column Y],1,0)

 

Could you please help me?

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @Anonymous

 

Have you tried something like this?

 

Column = 
    IF (
        SEARCH("client1" , 'Table2'[Column X] , 1 , 0 ) > 0 ||
        SEARCH("client1" , 'Table2'[Column y] , 1 , 0 ) > 0 ,
        --THEN --
        1 , 
        -- ELSE -- 
        0
    )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Phil_Seamark
Employee
Employee

Hi @Anonymous

 

Have you tried something like this?

 

Column = 
    IF (
        SEARCH("client1" , 'Table2'[Column X] , 1 , 0 ) > 0 ||
        SEARCH("client1" , 'Table2'[Column y] , 1 , 0 ) > 0 ,
        --THEN --
        1 , 
        -- ELSE -- 
        0
    )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.