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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
stefan321
New Member

Different collor compare values

Hi

 

 

i have two tables, lets say TableA & TableB

TableB contains allowed Version numbers like 13.1.5

TableA contains also some different Version number, but only allowed Version numbers (check from TableB) should be highlighted in TableA in "green" color.

If Version number is not in TableB, then hightlight Version number in "red" in TableA

 

How to do that?

Thanks a lot!

1 ACCEPTED SOLUTION

Please use the following measure:

 

CF =
IF (
NOT CONTAINSROW (
VALUES ( table2[version number] ),
SELECTEDVALUE ( table1[version number] )
),
"red"
)

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@stefan321 

Suppose you have your Version numbers from Table one on a table visual, Create the following measure, add conditional formatting > choose background, pick Field value as the Format Style and  pick this measure.

 

 CF =   IF(  NOT  CONTAINSROW( values(table2[version number] ), selectedvalue( table2[version number] ) , "red" )

 





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi

Thanks for your quick feedback!

unfortunately i get an error:
"Too few arguments were passed to the IF function. The minimum argument count for the function is 2"
Could you please check your code? think something is missing but i am not able to find it.

Please use the following measure:

 

CF =
IF (
NOT CONTAINSROW (
VALUES ( table2[version number] ),
SELECTEDVALUE ( table1[version number] )
),
"red"
)

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors