---
title: "Using Logical Operators to Compare Column Values"
description: "Leverage logical operators to efficiently compare and analyze column values in your dataset."
url: https://help.stackby.com/es/articles/60-using-logical-operators-to-compare-column-values
collection: "Using Formulas"
updated: 2025-01-10
language: es
alternates: [en]
---

# Using Logical Operators to Compare Column Values

Leverage logical operators to efficiently compare and analyze column values in your dataset.

Logical Operations in a programming-language symbol that denotes a logical operation. In stackby we use logical operators that allow you to compare values in one column to another column. 

##   
**Greater then or less then**

We will have two columns income and expenses, from that we will find whether it is greater than or less that with the help of operator in Stackby

**Greater then**: If income is greater than expenses, we will check this. The result will be either true(1) or false(0) as. 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/728c01100acf4365c59aa399f18fcadd49eb2179c1098fee05fe6893f096c2881658315255120.png)

**Result**:

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/7c541e5167f42b44521e71b65874c447a33264645f3a97fc4a6b39f502dab6361658315400293.png)

 **Less then:** If income is less than expenses, we will check. The result will be either true(1) or false(0). 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/d9ff19e441f0e026e2b71724e695d6956855dc83abfba19cb5aba8fd2e21c54f1658315454592.png)

**Result:** 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/ce50422b20a7e7e6eb4a2a0c29a1676dafe9f36b3fd933b78d03dedd8d0f33b91658315509615.png)

## **Greater then or equal to or less then or equal to**

### **Greater then or equal to**

We have seen that if income is greater than expenses the result will be 0 or 1. But what if both are the same?  So If income is greater than equal to expenses then the result will be 1(true).

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/f20711ebd13d160737a5afb329d249c0a6e1bb3dc45b945c51160fa2617e0ad41658315595541.png)

**Result:** 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/4eb332e72024c18a35f3060e0c5fa328fef8b4532fcd93e34116fbc7b83f99521658315674473.png)

### **Less then or equal to**

In the same way, If income is less than equal to expenses then the result will be 1(true).

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/fee8f8d92c2068496d9478d15b90df9a922f89d887bb200ca5e11fd554b6e02d1658315731598.png)

**Result:**

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/b7f45e0b1b17db323af7095f001cde8c0b42102b7d28b2e1e7fbe198c2b1669d1658315912079.png)

**Equal:** Check if income is exactly equal to expenses. We will use “=” operator.

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/0151f6d40d5e60e978e65ea58144cc1ea5b9fc032b0dfed9e4d63e23e16b43961658315995824.png)

**Result:** 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/d5a762160308496b7d2c52994b333a394f0538a0087bb204ab32ee86d954bd7a1658315968587.png)

**Does not equal:** Same, we can check if a value is not equal to another by using “!=” operator.

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/fbb70bd5f504e1dda1c1247681a17af609fb307f2f0138710ce0095f34326abc1658316048251.png)

**Result:** 

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/e64623b387344496c301f84bb7984c387247b36b984a57cd1dd0bd84759692a31658316109604.png)
