Forum Discussion

pitcraj's avatar
pitcraj
Helper I
4 years ago
Solved

Matrix color formatting based on Column

Hi All,
I am using the matrix visual with a single field (FY) in Row and multiple Values in Values section.
I am looking to get a Font color formatting on it as in attached:
For the FY column FY2015 - we would want to color in the values 2012/2013/2014 (light blue) and the other rows with data a different color (Say Green) and also if any value (<0) then Red.
Then for the FY column FY2016 - we would want to color in the values for 2013/2014/2015 (light blue) and the other rows with data a different color (Say Green) and also if any value (<0) then Red.
The same logic would be mimic for each additional year. The expected result should be as in the attached. Please let me know if any additional information needed. I was using DAX functions Selectedvalue and Switch, but I haven't got any success.
The logic should be like this : example - If selectedvalue is FY2015 then the values of (2012,2013,2014) should be in Blue and if any value less than zero (<0) then should be in Red otherwise say Green.
Same logic should go for the next row - If selectedvalue is FY2016 then the values of (2013,2014,2015) should be in Blue and if any value less than zero (<0) then should be in Red otherwise say Green. Same logic should go with each additional year.

 

Is this possible? Any help on this is much appreciated!

 

10 Replies

  • Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

  • Hi - thanks for coming back, much appreciated !

    Just to simplyfy - I have attached the simple data table and the matrix in the screenshot.

    And the desired output has to be like below:
    -When FY is FY2015 then the Row values of 2012,2013,2014 has to pick Blue color Font and the rest has to be green (2015,2016,2017,2018), also one other if any value in that row is negative that has to pick color Red,

    -When FY is FY2016 then the Row values of 2013,2014,2015 has to pick Blue color Font and the rest has to be green (2012,2017,2018) also one other if any value in that row is negative that has to pick color Red,

    Same logic has to continue for FY2017, FY2018

    Please let me know if you need any additional information ! thanks for helping out here!