# Unable to set value/target value of two calculated fields

**URL:** <https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743>\
**Category:** Q&A\
**Tags:** calculations, analysis, quick-sight\
**Created:** [November 17, 2022, 7:37pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743 "2022-11-17T19:37:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shohini](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shohini](https://community.amazonquick.com/u/shohini)\
**Post date:** [November 17, 2022, 7:37pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/1 "2022-11-17T19:37:35Z")

</div>

I created calculated fields that are correctly generating the numerator and denominator of my desired calculation (With one value per row in our table, summed).

However it won’t let me put the numerator over the denominator, whether in its own calculated field or as a value/target value pair.

I keep getting the below error.

The only thing I can think of is that actually the left side data type is an INT, while the right side is a BOOL.

- But it’s summing correctly (as shown on the top visual) and my value/target value pair are still asking QS to sum the values
- I cannot find a function that will cast bool to int; and normal sql syntax is not working

 ![Screen Shot 2022-11-17 at 2.13.46 PM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/8/8a5be99b9ab44ca0c7d0f9bd84a4f2100a9addd5.png)

Would really appreciate any help.

---

<div class="post-metadata">

**Author:** ![todd.hoffman](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/todd.hoffman/32/16346_2.png) [@todd.hoffman](https://community.amazonquick.com/u/todd.hoffman)\
**Post date:** [November 17, 2022, 8:18pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/2 "2022-11-17T20:18:33Z")

</div>

Edit your dataset and click on the three dot menu to the right of the field name. From there you can select ‘Change data type’ and you should be able to select INT.

 ![Screenshot from 2022-11-17 15-17-15](https://d1wl4jav5dp96l.cloudfront.net/original/2X/d/d094b007b15ab9c61ff0c648c9b156e5b6521ff0.png)

---

<div class="post-metadata">

**Author:** ![shohini](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shohini](https://community.amazonquick.com/u/shohini)\
**Post date:** [November 17, 2022, 9:18pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/3 "2022-11-17T21:18:26Z")

</div>

I’m not getting the option for “Integer” / “String” / “Date” - only the geospatial types

---

<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:** [November 18, 2022, 7:23pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/4 "2022-11-18T19:23:47Z")

</div>

I think you need to scroll or reformat your screen to show those types. It might just be hidden above the header.

---

<div class="post-metadata">

**Author:** ![Kellie\_Burton](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kellie_burton/32/2603_2.png) [@Kellie\_Burton](https://community.amazonquick.com/u/Kellie_Burton)\
**Post date:** [November 28, 2022, 9:30pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/5 "2022-11-28T21:30:46Z")

</div>

Hi @shohini! Checking in. Did this question get resolved? If you still need assistance, please respond to this topic. Thanks!

---

<div class="post-metadata">

**Author:** ![shohini](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shohini](https://community.amazonquick.com/u/shohini)\
**Post date:** [November 29, 2022, 2:55pm UTC](https://community.amazonquick.com/t/unable-to-set-value-target-value-of-two-calculated-fields/7743/6 "2022-11-29T14:55:31Z")

</div>

I didn’t but I basically created a new dataset that would have the right data types and formats via SQL query which solved my issue.
