Get Free Trial

How can I conditionally format a column based on the value from a second measure?

Jake Hoffner asked on May 28, 2020

Say I have a pivot table with two columns:

  • Total Results
  • Avg Score

I want to highlight Avg Score if it’s below 50, but only if there are more than 10 Total Results. 
I tried looking at onCustomizeCell but the row data is available, only the cell information. It doesn’t seem like rowIndex can be used with something like getRows() to return the information I want either. 
Is there another approach that I could take to get this data?

1 answer

Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 29, 2020

Thank you for your question.
An additional hierarchy can be added to the formula through specifying its aggregation type and uniqueName.
For example, the described result can be achieved using the following formula:

"formula": "#value < 50 AND sum('Results') > 10"

Please see an example we have prepared for you.
The list of operators that can be used in the formula can be found in our documentation.
Our team hopes it helps.
Do not hesitate to contact us in case additional questions appear.
Kind regards,

Please login or Register to Submit Answer