# Conditional formatting not working for min and max value in the between range

**URL:** <https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345>\
**Category:** Q&A\
**Tags:** analysis, formatting, quick-sight\
**Created:** [August 23, 2023, 10:18pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345 "2023-08-23T22:18:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mansi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@Mansi\_Parekh](https://community.amazonquick.com/u/Mansi_Parekh)\
**Post date:** [August 23, 2023, 10:18pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/1 "2023-08-23T22:18:11Z")

</div>

I’m using conditional formatting on my pivot table where I’m adding different background colors based on measure values. For example, if the measure is between 1.00 to 1.99, color should be light green. Running into a problem here where values 1.00 and 1.99 aren’t picking up the background color. They remain white. Are min and max values not included in formatting for between conditions?

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [August 24, 2023, 12:46pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/2 "2023-08-24T12:46:22Z")

</div>

Did you make sure they are greater than **or equal to** and less than **or equal to**?

---

<div class="post-metadata">

**Author:** ![Mansi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@Mansi\_Parekh](https://community.amazonquick.com/u/Mansi_Parekh)\
**Post date:** [August 24, 2023, 4:35pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/3 "2023-08-24T16:35:22Z")

</div>

Yes, even if I use ‘greater than or equal to’ condition, for eg: \>=2, 2 doesn’t pick up the color but all numbers greater than 2 do.

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [August 29, 2023, 1:12pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/4 "2023-08-29T13:12:39Z")

</div>

Can you show me what you’re seeing?

Also make sure that there is no rounding. For example 1.999999999 would not be blue.

---

<div class="post-metadata">

**Author:** ![Mansi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@Mansi\_Parekh](https://community.amazonquick.com/u/Mansi_Parekh)\
**Post date:** [August 29, 2023, 5:12pm UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/5 "2023-08-29T17:12:09Z")

</div>

![Screenshot 2023-08-29 at 10.06.57 AM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/4/416b36e6ad3edb01f4695ac48f92478ca209970e.png)

Value 1 in the screenshot should be light green. Instead, its white because its not picking up the background color. My condition is if values are between 1 and 1.99, then use green as the background color. 1 and 1.99 particularly are still white. Looks like between doesn’t include the min and max values in the condition.

---

<div class="post-metadata">

**Author:** ![Thomas](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/thomas/32/3624_2.png) [@Thomas](https://community.amazonquick.com/u/Thomas)\
**Post date:** [September 1, 2023, 11:59am UTC](https://community.amazonquick.com/t/conditional-formatting-not-working-for-min-and-max-value-in-the-between-range/17345/6 "2023-09-01T11:59:39Z")

</div>

Hi @Mansi_Parekh, thanks for sharing your example. Similarly to what Max had already mentioned, I’d expect your described behavior coming from the formatting configured to your values. It looks like your numbers are formatted to use 2 decimal places. As Quick Sight is rounding the numbers in that case to two digits, every number `>=0.995` and `<1.005` will be displayed as `1.00`. However, if the underlying number is `<1`, your formatting condition is not met and, hence, the background color not changed.

How to handle those cases strongly depends on your use case. If you want the conditional formatting to be strictly aligned to the formatted numbers shown in the visual (vs. the actual underlying number), you could simply adjust your range in the condition according to the rounding logic described above.

Did this answer your question? If so, please help the community out by marking this answer as “Solution!”. Thanks!
