Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Background color for a column having values with different data types in a matrix visualistion

Hello,

 

Looking for some help with the below scenario.

 

I have a table which contains two different kind of values in a column, one is N/A and other ones have percentage values in it. Because this is under one column, the data type of this is text.

 

I am using a matrix visualisation which has this column in the Values section. My requirement is to set background color (conditional formatting) for this column, where if the value is greater than 0 and less than 20% those cells should have background color as light green and anything above 20% should have light red and the remaining cells which have N/A should have background color as white.

 

My problem area:

Because the column data type is text as it as two different type of values, setting background color for it is getting tricky. I did think of putting a placeholder for N/A values as -1%, but in scenarios where we get actual data as -1%, that would get tricky. Given the scenario, N/A cannot be replaced with  0% / a blank value as these values are legit values for other rows.

I know it is probably difficult to get a straight forward solution for columns having different data types, however, if you can suggest any other approach like different placeholders/creating measures that would be really helpful.

 

Would really appreciate any help/guidance.

 

Thanks!

  • Hi Anonymous 
    You can base the conditional formatting on the column that is out of the visual. 
    So you can add from the PQ column with numeric values like :

    Change the data type to "whole number"

    Not to put it to you visual, but to use it for conditional formatting rule:

    Result:

     

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

4 Replies