Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Does anyone know how to conditionally format columns in a pivot table. I have one column that has 4 values. First value is target and the rest are actuals. If the target is greater than actuals that corresponding cell should be red. If not I want it green. Any thoughts on how I can make it happen?
I was playing with background color expression for the measure but since its just one column that has 4 values I am not sure how to compare them. I have one dimension for the column that has 4 values. And the measures are on the row. I want to compare the numbers on column 1 vs 2,3,4 and make them red or green depending on whether its greater or lesser than the target.
This is what did the trick for me. I am yet to fully incorporate that logic but as you can see the SGO row gets color coded correctly based on the Target column.
if((first([SGO])< [SGO]), green(),
if((first([SGO])> [SGO]), red(),white()))
Try this
=if(after(index)<= index, green(),red())
[index] to refer to the name of the expression.
hi,
Check with this video you can use dimensionality() function to achieve this requirement
https://www.youtube.com/watch?v=uzXHbhNCykM
Vikas
Thanks for your response. It was helpful to learn about the dimensionality function which I am sure will be using in the future,. But my need is compare the actual values on column1 against columns 2,3,4 and format them accordingly. Not sure how Dimensionality can be used for that.
Thanks for the suggestion. Seeing your suggestion helped me figure out the final solution.
This is what did the trick for me. I am yet to fully incorporate that logic but as you can see the SGO row gets color coded correctly based on the Target column.
if((first([SGO])< [SGO]), green(),
if((first([SGO])> [SGO]), red(),white()))