# Conditional table formatting using dynamic value

**URL:** <https://community.amazonquick.com/t/conditional-table-formatting-using-dynamic-value/2668>\
**Category:** Q&A\
**Tags:** analysis, formatting, quick-sight\
**Created:** [March 30, 2022, 10:46am UTC](https://community.amazonquick.com/t/conditional-table-formatting-using-dynamic-value/2668 "2022-03-30T10:46:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumarm22](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@kumarm22](https://community.amazonquick.com/u/kumarm22)\
**Post date:** [March 30, 2022, 10:46am UTC](https://community.amazonquick.com/t/conditional-table-formatting-using-dynamic-value/2668/1 "2022-03-30T10:46:41Z")

</div>

Is there a way I can define conditional formatting based on a dynamic value stored in a variable or parameter? Currently it’s fixed value as shown in the example below:

Instead of hardcoding 4.57, I want to keep it dynamic so that I can define different threshold values for different products.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/7/79643afa98100c698fc008413f08d92db5c913a0.jpeg)

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [March 31, 2022, 5:49pm UTC](https://community.amazonquick.com/t/conditional-table-formatting-using-dynamic-value/2668/2 "2022-03-31T17:49:32Z")

</div>

Hi Kumar - You can write a calculated field that makes the comparison:  
ifelse(avg(answer\_score)\> ${parameter}, 1, 0)

And then set your conditional formatting rule off of that field ( =1 for true)
