Skip to main content
Solved

OLAP Table Conditional Formatting based on value of an in-row KPI

  • November 29, 2023
  • 7 replies
  • 18 views

I have an OLAP table with a flag KPI (0 or 1) calculated at its end.

How can I, or can I reference that KPI in a custom object to define a style rule to highlight rows where that flag is 1?

Best answer by janpeter.van.d

I don't think I phrased my question very well-

in an OLAP table, is it possible to alter one column based on the contents of another?

Ah I see, as far as I know this is not possible.

7 replies

  • Author
  • Level 3
  • November 29, 2023

This is in a view.


janpeter.van.d
Level 12
Forum|alt.badge.img+26

Hi @trevor.nixon,

 

You were in the good direction with creating a Custom Object. You need to create one that looks something like this:

 

  - id: CO_DISPLAYRULE_10_flag

    displayName: Display Rule for 1 or 0 flag

    customAttributes:

      - comparator: EQUAL

        value: 1

        style:

          backgroundColor: "#00b612"

          fontWeight: bold

      - comparator: EQUAL

        value: 0

        style:

          backgroundColor: "#ff6242"

          fontWeight: bold

 

Note that you do not have to specify any KPI here, it just looks to the value.

 

Next step is to apply this in you OLAP table field:

 

Add styling rule to table column 

Your result will look like this:

image 

I hope this helps!


  • Author
  • Level 3
  • November 30, 2023

Is there a way I can apply this to other cells in the row?


janpeter.van.d
Level 12
Forum|alt.badge.img+26

Is there a way I can apply this to other cells in the row?

You sure can! Since the Custom Object is not applied on a KPI/column but just to the values 1 and 0, you can add it to every column with these values. Just follow the step in the screenshot of my previous answer.

 

If this answer helped you, please accept it to help fellows with the same question.


  • Author
  • Level 3
  • November 30, 2023

I don't think I phrased my question very well-

in an OLAP table, is it possible to alter one column based on the contents of another?


janpeter.van.d
Level 12
Forum|alt.badge.img+26

I don't think I phrased my question very well-

in an OLAP table, is it possible to alter one column based on the contents of another?

Ah I see, as far as I know this is not possible.


  • Author
  • Level 3
  • December 1, 2023

Ah I see, as far as I know this is not possible.

OK - thank you for your answer.