Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a matrix for 2019 that looks as follows
LC/HC
Region
LA 84
NA 100
WE 92
And a similar matrix for 2018:
LC/HC
Region
LA 82
NA 102
WE 90
Now 2018 value for LA was 82 whereas 2019 scorecard has 84. There has been an increase in Labor cost for 2019 and hence, I would like to show 84 with red background. Similarly if any other value in 2019 scorecard has a higher value that that present in 2018, it would be highlighted in red.
(LC/HC is a measure value)
Is there a way to write a measure for this comparison and perform a conditional formatting on the cell?
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
Does your data table look like this?
If not, if you have two tables for 2019 and 2018, you can append your tables in "Edit Query" .
I creatde a measure:
Measure 3 =
VAR x =
CALCULATE(
MAX(Sheet8[LC/HC]),
ALLEXCEPT(
Sheet8,
Sheet8[Region]
)
)
RETURN
IF(
FIRSTNONBLANK(Sheet8[LC/HC], 1) = x,
"RED", "WHITE"
)
Then add the measure to here:
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Does your data table look like this?
If not, if you have two tables for 2019 and 2018, you can append your tables in "Edit Query" .
I creatde a measure:
Measure 3 =
VAR x =
CALCULATE(
MAX(Sheet8[LC/HC]),
ALLEXCEPT(
Sheet8,
Sheet8[Region]
)
)
RETURN
IF(
FIRSTNONBLANK(Sheet8[LC/HC], 1) = x,
"RED", "WHITE"
)
Then add the measure to here:
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Without knowing how your data was set up I would suggest something like:
Check = If(lookupvalue('2018 table'[LC/HC],'2018 table'[Region],'2019 table'[Region])<lookupvalue('2019 table'[LC/HC],'2019 table'[Region],'2018 table'[Region]), 1, 2)
Then you include the result in the matrix
Unfortunately, you do have to include the column for the "Check" number in the Matrix for the conditional formatting to work. Microsoft is apparently working on making this better.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |