cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

How to compare two text column in a matrix

I have a matrix like below. That shows the manager name in different month. I need to compare the two text columns in the same row and if the name is different, then get color in second column or first column.

I need a result like this: Get a color in a column that are not the same with the first one

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi

tables i have used

manager table

date table(just for this demo)

create a relationship between the month columns of 2 tables

Try the following steps:

1. Create a table with the following fields

2. use the following measure in conditional formatting(background color) of manager column of the table

COLOR =
IF (
CALCULATE (
DISTINCTCOUNT ( Manager[Manager] ),
ALLEXCEPT (
Manager,
Manager[Emp_id]
)
) > 1
&& CALCULATE (
MAX ( 'date'[MonthNumber] ),
ALL ( Manager )
)
= SELECTEDVALUE ( 'date'[MonthNumber] ),
"Green"
)

3. convert it to matrix

If this post helps, Accept it as a solution

Anonymous
Not applicable

Hi

tables i have used

manager table

date table(just for this demo)

create a relationship between the month columns of 2 tables

Try the following steps:

1. Create a table with the following fields

2. use the following measure in conditional formatting(background color) of manager column of the table

COLOR =
IF (
CALCULATE (
DISTINCTCOUNT ( Manager[Manager] ),
ALLEXCEPT (
Manager,
Manager[Emp_id]
)
) > 1
&& CALCULATE (
MAX ( 'date'[MonthNumber] ),
ALL ( Manager )
)
= SELECTEDVALUE ( 'date'[MonthNumber] ),
"Green"
)

3. convert it to matrix

If this post helps, Accept it as a solution