# How set background of cell depending on the thresold value in Pivot Table

**URL:** <https://community.amazonquick.com/t/how-set-background-of-cell-depending-on-the-thresold-value-in-pivot-table/44101>\
**Category:** Q&A\
**Tags:** analysis, calculations, formatting, Business-Intelligence-Engineer, quick-sight\
**Created:** [March 25, 2025, 9:39am UTC](https://community.amazonquick.com/t/how-set-background-of-cell-depending-on-the-thresold-value-in-pivot-table/44101 "2025-03-25T09:39:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohitkaushik1](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mohitkaushik1](https://community.amazonquick.com/u/mohitkaushik1)\
**Post date:** [March 25, 2025, 9:39am UTC](https://community.amazonquick.com/t/how-set-background-of-cell-depending-on-the-thresold-value-in-pivot-table/44101/1 "2025-03-25T09:39:13Z")

</div>

I am using a pivot table which show data, but i need to add background to cell where certain condition is true.  
Condition - I am showing say(Actual Value and Thresold value) in two columns and i need when Actual Value is greater then Threshold value then particular cell background (Actual Value) appear to red.

---

<div class="post-metadata">

**Author:** ![msnehali](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/msnehali/32/28414_2.png) [@msnehali](https://community.amazonquick.com/u/msnehali)\
**Post date:** [March 25, 2025, 11:14am UTC](https://community.amazonquick.com/t/how-set-background-of-cell-depending-on-the-thresold-value-in-pivot-table/44101/2 "2025-03-25T11:14:03Z")

</div>

Hello @mohitkaushik1

Although we do not have a direct method, but you can try this alternative:  
You have two columns {Actual-value} and {threshold-value}  
We can create a calculated field that will check the difference

Diff:

> {actual-value}-{threshold-value}

Now, if diff value is greater than zero, then actual value is above the threshold value and we can use conditional formatting to mark it with your desired color.

-Add Conditional formatting on your pivot table visual  
-Select actual-value column  
-For “Format field based on” select your Diff calculated field column  
-Set condition to be greater than zero and hit apply.

It will look like this:

 ![pivot-table-conditional-formatting](https://d1wl4jav5dp96l.cloudfront.net/original/3X/8/8/8867be4696007166ce53b634a35d43fb748f5001.png)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![mohitkaushik1](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mohitkaushik1](https://community.amazonquick.com/u/mohitkaushik1)\
**Post date:** [March 25, 2025, 12:44pm UTC](https://community.amazonquick.com/t/how-set-background-of-cell-depending-on-the-thresold-value-in-pivot-table/44101/3 "2025-03-25T12:44:34Z")

</div>

> [@msnehali](#):
>
> Format field based on

Thanks it work for me
