Skip to main content
Solved

Calculate the estimate of all shapes with a specific background color


Forum|alt.badge.img+1

Anyone know if there is a formula to calculate the Estimate value of all shapes where the background fill color is a specific Hex value?

I’m still learning but here is what I have figured out so far...

I have a container with 2 shapes inside it with different fill colors.

I can calculate the number of shapes with a specific fill color using this formula

=COUNTIF(children(page), x => FILLCOLOR(x)
= HEXCOLOR('#e6e6ff'))

Result of the above above is 1 since I have 1 shape that matches that hex value.

And I can calculate the Estimate field using this formula:

=CONTAINED."Estimate"

The answer above is 5 (3 from one shape, and 2 from the other shape)

But I want some way to calculate the estimate field of ONLY the shapes that have a fill color of “#e6e6ff”

Best answer by Emma D

Hi ​@rmalick ! You might want to try using the FILTER function in your formula to return only the shapes with the specified fill color.  Here is an example (assuming that you want to sum the data property values for the ‘Estimate” property on applicable shapes): 

=SUM(FILTER(children(page), x => FILLCOLOR(x) = HEXCOLOR('#e6e6ff'))."Estimate") 

View original
Did this topic help you find an answer to your question?

Emma D
Forum|alt.badge.img+7
  • Lucid support team
  • April 7, 2025

Hi ​@rmalick ! You might want to try using the FILTER function in your formula to return only the shapes with the specified fill color.  Here is an example (assuming that you want to sum the data property values for the ‘Estimate” property on applicable shapes): 

=SUM(FILTER(children(page), x => FILLCOLOR(x) = HEXCOLOR('#e6e6ff'))."Estimate") 


Forum|alt.badge.img+1

That worked. Thank you!


Reply