# Calculated Field Not working, Similar ones work fine

**URL:** <https://community.amazonquick.com/t/calculated-field-not-working-similar-ones-work-fine/4376>\
**Category:** Q&A\
**Tags:** calculations, quick-sight\
**Created:** [June 24, 2022, 5:44pm UTC](https://community.amazonquick.com/t/calculated-field-not-working-similar-ones-work-fine/4376 "2022-06-24T17:44:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethan\_shaffer](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@ethan\_shaffer](https://community.amazonquick.com/u/ethan_shaffer)\
**Post date:** [June 24, 2022, 5:44pm UTC](https://community.amazonquick.com/t/calculated-field-not-working-similar-ones-work-fine/4376/1 "2022-06-24T17:44:12Z")

</div>

Hello All, I’ve made a couple calculated fields that work in a system to find the lowest value of two assessment types.

 ![Screen Shot 2022-06-24 at 12.38.14 PM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/f/f38eb0f3d758562f0be0a1c6a87f30156eeadf7b.jpeg)  
The final category is supposed to be “masters”, “exemplary” and so on instead of 1-4. The Syntax I’ve tried using to convert the numbers into the larger categories is as follows:

ifelse(  
{Final Category}=4, “Masters”,  
{Final Category}=3, “Exemplary”,  
{Final Category}=2, “Recognized”,  
“Ineligible”)

I’m getting an error on the first {final category} and I’m not sure why. Any help on this topic would be great. Thanks.

---

<div class="post-metadata">

**Author:** ![robdhondt](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/robdhondt/32/194_2.png) [@robdhondt](https://community.amazonquick.com/u/robdhondt)\
**Post date:** [June 25, 2022, 2:46pm UTC](https://community.amazonquick.com/t/calculated-field-not-working-similar-ones-work-fine/4376/2 "2022-06-25T14:46:58Z")

</div>

Hi @ethan_shaffer -

It’s possible you are trying to compare an integer with a string. I can’t tell the data type of ‘Final Category’ from the image.

You can quickly check this by switching your integers to strings in your calculated field and see if it works.

```auto
ifelse(
{Final Category}='4', “Masters”,
{Final Category}='3', “Exemplary”,
{Final Category}='2', “Recognized”,
“Ineligible”)

```
