Forum Discussion

RameshPachunuri's avatar
RameshPachunuri
Microsoft Employee
6 years ago
Solved

Color apply horizontally

How do we apply color in horizantal way like Row wise? For example we have a table shown below and it has values from Col1 to 5 and I want to apply the color variations based on the value like if it ...
  • RameshPachunuri's avatar
    RameshPachunuri
    6 years ago

    Thank you for your repsonse.

    It seems in your col2 to 5 are coming from seperate columns. But myside columns data is coming from single column from Tabl as shown below.

    Here I am splitting the values based on Column1 and DateTime then showing in the matrix as shown below. Then I want to apply colors in Matrix tables based on Max, min and Middle values with respect to Column1 and DateTime columns. Please let me know how can we achieve this?

  • v-frfei-msft's avatar
    v-frfei-msft
    6 years ago

    Hi RameshPachunuri ,

     

    Here we go.

     

    Measure = VAR MAXV = CALCULATE(MAX('Table'[Column 2]),ALLEXCEPT('Table','Table'[Column 1]))
    VAR MINV = CALCULATE(MIN('Table'[Column 2]),ALLEXCEPT('Table','Table'[Column 1]))
    RETURN
    IF(SUM('Table'[Column 2]) = MAXV , "Red", IF(SUM('Table'[Column 2]) = MINV,"Green", "Orange"))

     

     

    Pbix as attached.