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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply

Highlight the values in Table A from Table B - Conditional formatting !..

Dear experts 
I have a Situation here, Please help me with Solution. 
I have created 2 table visuals, which are connect through 2 bridge table.

ravirayala4252_0-1692960470117.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @ravirayala4252 ,

 

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _columnB=MAX('TableB'[Order ID])&""&MAX('TableB'[Material ID])
var _columnA=SELECTCOLUMNS('TableA',"Group",'TableA'[Order ID]&""&'TableA'[Material ID])
return
IF(
    _columnB in _columnA,"red","white")

2. Select [Actual Hours] – Conditional formatting – Background color.

vyangliumsft_0-1693202946935.png

vyangliumsft_1-1693202946938.png

3. Result:

vyangliumsft_2-1693202982309.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3

Hai @amitchandak @Anonymous 

I think it is better to rephrase my question.
I have 2 tables with are not directly connect, which are connect throught 4 bridge tables. i did this to avoid many to many relation.
I have created 2 table visuals from these 2  tables say A,B.
Table A & B have common columns (Order ID , Material ID & Market ID).
Now i want to highight the matching b/w two table visuals. I used the following measere but it's not wotking for me.please suggest me appropreated on.
FYI, Below measure error i'm getting was not able to see the table B in related function .

1. MatchingHighlight =
IF(
COUNTROWS(
FILTER(
ALL(DateTable, OrderIDTable, MaterialIDTable, MarketIDTable),
COUNTROWS(
FILTER(
Table1,
Table1[Order ID] = RELATED(OrderIDTable[Order ID]) &&
Table1[Material ID] = RELATED(MaterialIDTable[Material ID]) &&
Table1[Market ID] = RELATED(MarketIDTable[Market ID]) &&
Table1[Date] = RELATED(DateTable[Date])
)
) > 0
)
) > 0,
"Match",
"No Match"
)

Anonymous
Not applicable

Hi  @ravirayala4252 ,

 

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _columnB=MAX('TableB'[Order ID])&""&MAX('TableB'[Material ID])
var _columnA=SELECTCOLUMNS('TableA',"Group",'TableA'[Order ID]&""&'TableA'[Material ID])
return
IF(
    _columnB in _columnA,"red","white")

2. Select [Actual Hours] – Conditional formatting – Background color.

vyangliumsft_0-1693202946935.png

vyangliumsft_1-1693202946938.png

3. Result:

vyangliumsft_2-1693202982309.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@ravirayala4252 , Create a new measure  for table 2

 

Countrows(filter(Table2,Table2, Table2[Material] in values( Table1[Material] ) &&  Table2[Order] in values(Table1[Order] )  ))

 

 

 

Countrows(filter(Table2,Table2, Table2[Material] && "-" && Table2[Order] in  selectcolumns(Addcolumns(Summarize(Table1, Table1[Material] ,Table1[Order] ) , "_1", Table1[Material] && "-" && Table1[Order] ), "_2", [_1]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors