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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
SantoshKumar
Microsoft Employee
Microsoft Employee

Display Search Value and table name as result from multiple tables

Hi,

 i have three tables and i want to search for each value from table1 in table2 and table3.

End result should be such that i want to know in which tables does my searchedvalue exists.

Example :

Sample Data: Three tables

Table1Table2Table3
DeviceIdDeviceId DeviceId
InstallDateTargetOsTargetOs
NameIngestDateIdIngestDateId
PublisherIngestTimeIngestTime
SourceInfSource
VersionVersionDriverVerDate

Expected Result:

DeviceIdTable2Table3
InstallDate  
Name  
Publisher  
Source Table3
VersionTable2 

 

Can we achieve this output using power bi?

 

Thanks

Santosh

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @SantoshKumar ,

 

You can add the following measure:

 

Result = var Table_2 = 
 IF(
      SUMX(Table2,
           FIND(
                UPPER(SELECTEDVALUE(Table1[Table1])),
                UPPER(Table2[Table2])
                ,,0
               )
          ) > 0,
      "Table2",
      ""
     )

var Table_3 =  IF(
      SUMX(Table3,
           FIND(
                UPPER(SELECTEDVALUE(Table1[Table1])),
                UPPER(Table3[Table3])
                ,,0
               )
          ) > 0,
      "Table3",
      ""
     )

Return
CONCATENATE(Table_2,Table_3)

 

If you prefer a colum you can add the following code:

Result_Colum = var Table_2 = 
 IF(
      SUMX(Table2,
           FIND(
                UPPER(Table1[Table1]),
                UPPER(Table2[Table2])
                ,,0
               )
          ) > 0,
      "Table2",
      ""
     )

var Table_3 =  IF(
      SUMX(Table3,
           FIND(
                UPPER(Table1[Table1]),
                UPPER(Table3[Table3])
                ,,0
               )
          ) > 0,
      "Table3",
      ""
     )

Return
CONCATENATE(Table_2,Table_3)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @SantoshKumar ,

 

You can add the following measure:

 

Result = var Table_2 = 
 IF(
      SUMX(Table2,
           FIND(
                UPPER(SELECTEDVALUE(Table1[Table1])),
                UPPER(Table2[Table2])
                ,,0
               )
          ) > 0,
      "Table2",
      ""
     )

var Table_3 =  IF(
      SUMX(Table3,
           FIND(
                UPPER(SELECTEDVALUE(Table1[Table1])),
                UPPER(Table3[Table3])
                ,,0
               )
          ) > 0,
      "Table3",
      ""
     )

Return
CONCATENATE(Table_2,Table_3)

 

If you prefer a colum you can add the following code:

Result_Colum = var Table_2 = 
 IF(
      SUMX(Table2,
           FIND(
                UPPER(Table1[Table1]),
                UPPER(Table2[Table2])
                ,,0
               )
          ) > 0,
      "Table2",
      ""
     )

var Table_3 =  IF(
      SUMX(Table3,
           FIND(
                UPPER(Table1[Table1]),
                UPPER(Table3[Table3])
                ,,0
               )
          ) > 0,
      "Table3",
      ""
     )

Return
CONCATENATE(Table_2,Table_3)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix 

Yes, It answered my question and thanks for the Help !!

 

Thanks

Santosh

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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