# Pivot Table Formatting - Color-code columns

**URL:** <https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792>\
**Category:** Q&A\
**Tags:** formatting, quick-sight\
**Created:** [April 27, 2023, 12:49pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792 "2023-04-27T12:49:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [April 27, 2023, 12:49pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/1 "2023-04-27T12:49:28Z")

</div>

Is it possible to colour-code contents of a particular column(identified by column header) in quicksight pivot tables?

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/f/f7679180becb9b12b3b839c810902c864dfa8c2e.png)

For instance, I would like to color the contents of the columns with name Price in blue and with the name absolutes in red.

Thanks,  
Tanisha

---

<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:** [April 27, 2023, 6:59pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/2 "2023-04-27T18:59:08Z")

</div>

Yes you can conditionally format text to be certain colors.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/c/c2282de452c9e9ebc94e8a021669c3ce91428959.png)

You would then hardcode the values per column.

Essentially you’re going to have to pick a color for each column anyways so you can just hardcode it.

---

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [April 28, 2023, 12:23pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/3 "2023-04-28T12:23:09Z")

</div>

Hi Max,

Thanks for the solution, this does not work on my pivot table visualization. All the values are calculated fields - most of them using Level-Aware Calc. Is there any known limitation to conditional formatting in QS?

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/4/4dfe1c88bc6041eb7850ceb03ddf68b61018a3ab.png)

Many thanks!

Regards,  
Tanisha

---

<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:** [May 1, 2023, 2:07pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/4 "2023-05-01T14:07:48Z")

</div>

Are you saying you can’t base your text color off of your calculated field?

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/c/cf96bb1c5ce6d9fe587b7703bbb3fd2445e3e161.png)

Why do you need to base it off of your calculated field if you just want the color to be based off of the column name?

You could base it off of any row and have it always show that color.

---

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [May 1, 2023, 3:53pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/5 "2023-05-01T15:53:53Z")

</div>

> [@Max](#):
>
> calculated field if you just want the color to be based off of the column name?

Hi Max,

All the value fields in my pivot table are calculated fields and I want to color code basis some words in the column headers.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/e/edeea9c04a57a23b679f89c96e879c32234459fc.png)

Having said that, I cannot add a condition to color code basis header names and am trying to do it via the values of that field instead. And this does not work, if the value is a calculated field.  
 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/4/46ffa61701557ba791f1087237087338aede196f.png)

PS - I’ve tried conditional formatting before with other pivot tables with regular measure fields and works well with them.

Thanks!

---

<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:** [May 1, 2023, 4:41pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/6 "2023-05-01T16:41:01Z")

</div>

So when you click apply the Gap Titles rows don’t go blue?

Also, you cannot conditionally format a header.

You can do a blanket formatting of all headers but not individual ones.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/3/3410d48fb05ec16b6593a3a95f5d5837d46cb6b5.png)

---

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [May 1, 2023, 4:54pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/7 "2023-05-01T16:54:30Z")

</div>

Yes, when I hit apply - there is no change in the color. Any hacks to get around this?

---

<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:** [May 1, 2023, 10:06pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/8 "2023-05-01T22:06:12Z")

</div>

Hmm it should work.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/7/7f8c511e0620ca61cbb7fde7c60ca550fad0e3af.png)

Can you show me your table? All of the values are greater than zero right?

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/1/16d0c7ae2041afc3e7dc13f597581648ef164b89.png)

---

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [May 2, 2023, 9:42am UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/9 "2023-05-02T09:42:07Z")

</div>

The values are all \>0. Looks like there is an issue with this pivot table - as I’m also seeing a lot of delay/ lag for all the fields of the pivot table to load.  
Actually, this works in another pivot table even with calculated fields.

---

<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:** [May 10, 2023, 2:44pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/10 "2023-05-10T14:44:40Z")

</div>

Does you other table have what you are looking for?

I’ve encountered some visuals that just don’t work so I need to delete them and create a new one sometimes.

---

<div class="post-metadata">

**Author:** ![Tanisha\_Shetty](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Tanisha\_Shetty](https://community.amazonquick.com/u/Tanisha_Shetty)\
**Post date:** [May 10, 2023, 3:26pm UTC](https://community.amazonquick.com/t/pivot-table-formatting-color-code-columns/12792/11 "2023-05-10T15:26:58Z")

</div>

> [@Max](#):
>
> e visuals th

Yeah, I think this was an issue with the pivot table. I cleaned it up entirely - and redid it and it works fine so far even with the formatting.

Thanks for looking into it, Max.
