Summary row lookup

  1. My goal: Get a visual depending on the summary row
  2. Issue: Can’t find a way to address the summary row
  3. Steps I've taken to troubleshoot: So many different lookup in the way table1 is done
  4. Additional info: (Cloud or Self-hosted, Screenshots) Cloud version

The purpose is have a table where I get different integer values. I am then using the summary row to show the average for this column. My purpose is to change the background color of this column “Technique” depending if it is under or above the average of this column. For example of over I would put the cell green and if under I would show it yellow.

1 Like

Hey @MRConcept

I understand your issue ,

You just need to open that column. For example, I’m using the demo JSON like the one in your table.
Now, please click on the Technique cell.

Then, under Appearance, click on Background and set the condition there.

{{ (_.sumBy(table1.data, 'Technique') / table1.data.length) > 5 ? "yellow" : "green" }}

Doing this will update the color of the column.

Hey thanks ! In fact what I discovered is a computed column is not available in the tableX.data so I had to create a real column in my database Here was the final comparing to the item instead of 5 as you mentionned. tottech is the column name/id
{{ (_.sumBy(table1.data, 'tottech') / table1.data.length) > item ? "yellow" : "green" }}

Hey @MRConcept

Thanks for posting on the Retool community forums. My name is John and I will be assisting on this dynamic cell coloring.

I can see WildeStudios and your comments and these appears to be the most straight forward approach. It has a check that adjust's the color based on the sum.

Beyond what has already been shared here, is there anything else we can do on this request? If no, would you mind marking yours or WildeStudios comment as the resolution?

Regards,
John | Retool Support