0

How to add conditional formats (coloring) to elements for particular columns

Question: How to apply conditional Formatting to certain Columns

In a recent Question in the Q&A Section by Aaron Yohannan we got the question how to apply conditional formatting to certain columns.

"Can you please help us on having color formatting to different elements in the column as shown in the screenshot?"

This is the Solution:

  1. If you are using a Matrix grid then you can simply use the Formatting panel to format the member in the rows / columns. In the following example I want to format the manufacturer ‘Adihash’ in the rows areas of the grid.

    Select the element in the rows and select the Formatting panel > Rows option. Change the background colour.
     

    The Manufacturer > Adihash element will be formatted wherever the element is displayed.

  2. If the data is displayed using a Tabular grid option the formatting panel > rows option is not available. In this example we create a measure (Formulate > Calculation) and use it to format the row background colour.

  3. In the this example I have created a parameter (Global) to allow the end user to control which manufacturer element to color based on the characters the manufacturer description starts with.

    Create a global parameter, type : text with input validation as shown below.

  4. Using Formulate > Calculation I then create a measure based on the relevant data model.
    Calculation:
    If (StartsWith(<dimension/attribute>.currentmember.caption, <text>), RGB (221,86,49>, RGB (256, 256, 256))
    <dimension/attribute>currentmember.caption – read the current row manufacturer element description
    <text> - select Global parameter
    RGB(221,86,49) = orange
    RGB(256,256,256) = white

  5. In the Dropzone > Color area place the Measure Color element in the ‘Value’ area.

Following these Steps will give you the expected results

Reply

null