# Wrong If-Then-Else Result

**URL:** <https://community.glideapps.com/t/wrong-if-then-else-result/86956>\
**Category:** Ask for Help\
**Created:** [April 24, 2026, 5:03pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956 "2026-04-24T17:03:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 24, 2026, 5:03pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/1 "2026-04-24T17:03:39Z")

</div>

![Screenshot 2026-04-24 at 19.57.04](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/0/30b19ca9fe4df4cf68e491446cd0087ff908749b.jpeg)

Hello all,

I have an If → Then → Else column in Glide that categorizes QS rankings.

Source value examples:

58  
130  
416

Logic:

If value ≤ 10 → Top 10  
If value ≤ 50 → Top 50  
If value ≤ 100 → Top 100  
If value ≤ 150 → Top 150  
If value ≤ 200 → Top 200  
If value ≤ 300 → Top 300  
If value ≤ 500 → Top 500  
If value \> 500 → 500+

The issue:

58 returns Top 10 instead of Top 100.  
416 returns Top 10 instead of Top 500.  
130 returns Top 150 correctly.

I also created a Math helper column to force the value as a number, but the issue still happens.

Is this a caching bug, column type issue, or If → Then → Else issue? What is the best workaround?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 24, 2026, 5:17pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/2 "2026-04-24T17:17:30Z")

</div>

Interesting. I would assume it’s comparing as text, but I’m not quite understanding the pattern.

Can you try recreating the IF column from scratch?

---

<div class="post-metadata">

**Author:** ![Federico\_Fleitas](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/federico_fleitas/32/77461_2.png) [@Federico\_Fleitas](https://community.glideapps.com/u/Federico_Fleitas)\
**Post date:** [April 24, 2026, 5:34pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/3 "2026-04-24T17:34:43Z")

</div>

Hi,  
Invert the if, the largest numbers at the beginning and the 10 last, or use only the smallest Example: If QS World \< 11 then Top 10

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/9/f9cab692578ed8fc353b816acbf35dfaa7b165a5.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/6/568e8f1615020c424bc217f439d48e93b135512b.png)

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 24, 2026, 7:50pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/4 "2026-04-24T19:50:22Z")

</div>

I did, and noticed that it always reads the first logic and applies it to the rest whether it is true. I think it is a glitch? How to report it to Glide team if it is?

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 24, 2026, 7:55pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/5 "2026-04-24T19:55:09Z")

</div>

![Screenshot 2026-04-24 at 22.53.51](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/9/490a51e68d8075ea716b9838985debf4e4d4960a.jpeg)

I did, and still the same. I also inverted IF THEN ELSE and it turned out to keep reading the first logic no matter what.

 ![Screenshot 2026-04-24 at 22.46.09](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/e/3e816910f33f3253ff766680d1a1417e9485e44d.jpeg)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 24, 2026, 8:22pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/6 "2026-04-24T20:22:44Z")

</div>

Can you trace up through the QS World column? Is there anywhere in the path upwards where it may not return a numeric value or may be a number in a text column? Normally you wouldn’t even be presented with mathematical operators it it’s text, but I think I’m missing a piece of the puzzle.

Otherwise you can use the chat bubble in the bottom right of the builder to escalate to support, but I’m not convinced that it’s a bug yet. Otherwise there would be a lot of people complaining about broken IF logic.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 24, 2026, 8:46pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/7 "2026-04-24T20:46:34Z")

</div>

What the reason for the “If | QS World” column? Could you configure the “QS Test” column by referring to “Ranking | QS World (General)” lookup column directly?

What is the type of the column “Ranking | QS World (General)” is looking up? Is it a math or number column?

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 24, 2026, 9:12pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/8 "2026-04-24T21:12:52Z")

</div>

The “General” value comes from another numerical table. In other words, the source columns are all numeric.

What makes this unusual is that I am using almost 10 similar tables, and around 7 of them work perfectly with the same logic. Other ranking categories also work correctly, and they look up their values from the same ranking table as numeric values.

The issue only appears in the specific columns/screenshots I shared. That is why I suspected it might not be a formula logic issue, because the same structure works elsewhere with the same type of numeric lookup source.

I created the “If | QS World” column only as a workaround/test layer to normalize the looked-up numeric value before applying the category logic, but the source itself is already numerical. Check the screenshot, there is where I get the Ranking | QS Word General.

 ![Screenshot 2026-04-25 at 00.12.26](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63ea67dbfee749598b3632a1029ec7662827f61b.png)

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 24, 2026, 9:19pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/9 "2026-04-24T21:19:27Z")

</div>

Check this out. Shanghai Final column I believes it reads a hidden number which is why it returns with 500 + because Shanghai Final column is empty. I cleaned it up multiple times and didn’t work.

 ![Screenshot 2026-04-25 at 00.16.03](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/0/f035bcecfabf26200bdc71ac8dc5f9dd7ae33f5f.jpeg)

This is the source where General column gets the ranking from, all of them are numeric.

 ![Screenshot 2026-04-25 at 00.12.26](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63ea67dbfee749598b3632a1029ec7662827f61b.png)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 24, 2026, 10:05pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/10 "2026-04-24T22:05:57Z")

</div>

Could you double-click on the header of “If | Shanghai” and show a screenshot of how that if-then-else column is configured?

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 24, 2026, 11:28pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/11 "2026-04-24T23:28:51Z")

</div>

I’d be curious to see how you’ve configure “If | QS World” and “If | Shanghai”. If you share screenshots, could you share the entire configuration including the “Else” field.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 25, 2026, 1:41am UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/12 "2026-04-25T01:41:38Z")

</div>

@nathanaelb @Jeff_Hager @Federico_Fleitas

Thank you for trying to help.

Here is the full configuration.

I am trying to understand why the same ranking logic works correctly in most tables, but gives incorrect results in a few specific columns.  
\*\*  
Screenshot 1: General Overview\*\*  
This screenshot shows the final output columns side by side:

- Ranking | QS World (Major)
- Ranking | QS World (General)
- If | QS World
- QS Final

The intended logic is:

- If the major-specific QS ranking exists, use Ranking | QS World (Major).
- If the major-specific ranking is empty, use Ranking | QS World (General).
- Then classify the selected rank into Top 10, Top 50, Top 100, Top 150, etc.

In the screenshot, rows with General QS ranking 42 are correctly classified as Top 50. However, rows with rank 82 are incorrectly classified as Top 10, even though 82 should be Top 100.

 ![General Overview](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a576c3d0c13784d0364f02513e78c2aeed46381.png)

**Screenshot 2: Ranking | QS World (Major)**  
This column is a Number column.  
It contains the major-specific QS subject ranking when available.  
When this column is empty, the system should fall back to the general QS ranking.

 ![Ranking | QS World (Major)](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e8a7c249197725d0a900ee7479d8eb3103518d0d.png)

**Screenshot 3: Ranking | QS World (General)**  
This column is a Lookup column.  
It pulls the general QS ranking from a related table.  
The source column being looked up is numerical.  
This same source table and numeric ranking structure are also used by other ranking categories/tables that work correctly.

 ![Ranking | QS World (General)](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/69df8557396251713be48f13458289e10e107b73.png)

**Screenshot 4: If | QS World**  
This is an If → Then → Else column.  
The logic is:  
IF Ranking | QS World (Major) is not empty  
THEN Ranking | QS World (Major)  
ELSE Ranking | QS World (General)  
So this column is only meant to choose the major ranking first when it exists, and otherwise use the general ranking.  
Example:

- If Major rank exists: use Major rank.
- If Major rank is empty: use General rank.  
The output appears numeric in the table. For example, it returns 42 and 82 correctly.

 ![If | QS World](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/8/8846cb76f1d78ec34bca3ec393cb00a13046519f.png)

**Screenshot 5: QS Final**  
This is another If → Then → Else column.  
It reads from If | QS World and categorizes the rank:

IF If | QS World \<= 10 → Top 10  
IF If | QS World \<= 50 → Top 50  
IF If | QS World \<= 100 → Top 100  
IF If | QS World \<= 150 → Top 150  
IF If | QS World \<= 200 → Top 200  
and so on.

**The expected behavior:**

- 42 should return Top 50.
- 82 should return Top 100.
- 155 should return Top 200.
- 278 should return Top 300 or Top 500 depending on the category setup.

**The problem:**  
Some values are being classified incorrectly. For example, rank 82 is returning Top 10, even though it is not \<= 10. This suggests that the issue may not be with the visible logic itself, because the same structure works correctly in other tables/categories.

 ![QS Final](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/6223b551bea9d6797837ac3be22c46beb1454d2a.jpeg)

**Source table screenshot:**  
The source table contains numeric ranking columns, including:

- Ranking | QS
- Ranking | THE
- Ranking | Shanghai
- Ranking | US News  
These are number columns, and Ranking | QS World (General) is looking up its value from this numeric source table.

 ![Source table, Look up, these are where Ranking | QS World (General) get ranks from](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/783d2bdcc0617bc94097907a9c3dfe2692fdd389.png)

\*\*  
What I need help understanding:\*\*

Why would Glide classify 82 as Top 10 when the condition is If | QS World \<= 10?

All relevant source columns are numerical, and the lookup source is also numerical. The same logic works correctly in several other tables and ranking categories. The issue only appears in some specific columns, which makes it look like either:

1. Glide is treating the lookup/If output differently from a normal number in this specific table,

2. the If → Then → Else column is evaluating the wrong condition order internally,

3. there may be a cached/glitched computed column,

4. or the lookup result is visually numeric but not being evaluated as a clean number.

**The mistake needing a solution:**

The QS Final column is assigning the wrong category to some numeric values. Specifically, values like 82 are being returned as Top 10 instead of Top 100. I need to know whether this is caused by the Lookup column, the intermediate If | QS World column, the final If → Then → Else logic, or a Glide computation/cache issue.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [April 25, 2026, 1:17pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/13 "2026-04-25T13:17:00Z")

</div>

@nathanaelb @Jeff_Hager @Federico_Fleitas

I found the solution to my Glide If → Then → Else ranking issue, and would like to share it with you all hopefully it helps.

My setup:

`Ranking | US News (General)` = original ranking number  
`If | US News` = final ranking value used by the app  
`US News Final` = category column  
`US News Math` = math helper column  
`Correct Answers` = manual column I used to verify the expected result

The issue:

`If | US News` was showing `105`, but `US News Final` returned `Top 10`.

That was wrong because:

`105` should be `Top 150`, not `Top 10`.

Even though the value looked numeric, Glide was not evaluating it correctly inside the If → Then → Else category logic.

The fix:

I created a Math column called:

`US News Math`

Then I used this formula:

`N * 1`

where `N` = `If | US News`

After that, I rebuilt the category If → Then → Else using `US News Math` instead of `If | US News`.

Correct logic:

If `US News Math` ≤ 10 → Top 10  
If `US News Math` ≤ 50 → Top 50  
If `US News Math` ≤ 100 → Top 100  
If `US News Math` ≤ 150 → Top 150  
If `US News Math` ≤ 200 → Top 200  
If `US News Math` ≤ 300 → Top 300  
If `US News Math` ≤ 500 → Top 500  
If `US News Math` \> 500 → 500+

Result:

`105` now correctly returns `Top 150`.

My guess is that Glide was probably reading a hidden/underlying value differently from the visible number, which is why it kept returning `Top 10`.

The Math column with `N * 1` fixed it by forcing Glide to read the value as a clean number before applying the If → Then → Else category logic.

 ![Screenshot 2026-04-25 at 16.10.39](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/9/c96c6aba243618f257d21f1ae532289441c4d1b1.jpeg)

Thank you all, and have a wonderful weekend.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 25, 2026, 9:14pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/14 "2026-04-25T21:14:10Z")

</div>

The issue with text vs. numerical value is what Jeff suggested: “Interesting. I would assume it’s comparing as text, but I’m not quite understanding the pattern.”

Nice you figured out the issue. Nice approach with \*1.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 2, 2026, 9:14pm UTC](https://community.glideapps.com/t/wrong-if-then-else-result/86956/15 "2026-05-02T21:14:12Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
