Clay Icon

Unique Formula Generation for Company Domains in Clay

·
·

Hi everyone, I want to generate a formula in Clay that can run only on unique values. So for example I have a list of prospects with company domains. I want the formula to run only once per company domain while taking into account all the occurrences of that domain in my table. Can someone help me?

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    To create a formula that runs only once per unique company domain while considering all occurrences, you can use the Lookup Multiple Rows integration combined with conditional runs. Here's how: 1. Use the Lookup Multiple Rows integration to count occurrences of each domain in your table. 2. Create a new column for your desired formula. 3. In the new column's settings, set up a conditional run using an AI formula. 4. Use the AI to generate a formula that only runs when it's the first occurrence of a domain. For example: IF(ROW() = MIN(FILTER(ROW(), [Domain] = [Domain])), TRUE, FALSE) This approach ensures your formula runs only once per unique domain while still considering all occurrences in the table.

  • Avatar of Ammar K.
    Ammar K.
    ·
    ·

    Thanks for sharing. However I need a bit more clarification on the steps in the middle. I've ran the look up multiple rows function on the domain. Now I don't know how to plug that output in a formula.

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    To use the output of the Lookup Multiple Rows function on the domain in a formula, you can create a new column with an AI-generated formula. Here's how: 1. Add a new column for your formula. 2. Use the AI formula generator to create a custom formula. 3. In your formula, reference the output of the Lookup Multiple Rows function. For example, you could create a formula that counts the occurrences of a domain or performs actions based on the lookup results. The AI can help you generate specific formulas tailored to your needs, such as: "Count the number of rows where {{Lookup Multiple Rows Output}} contains the current domain" Remember to adjust the formula based on your specific requirements and the structure of your lookup results.

  • Avatar of Ammar K.
    Ammar K.
    ·
    ·

    For the formula I have the fields:

    • Number of occurrences of the domain

    • The domain cell

    • And the output of the Lookup Multiple Rows function - will I reference all of it?

    Please tell me exactly how to create that formula and what to input in the fields.

  • Avatar of Ammar K.
    Ammar K.
    ·
    ·

    Hi Luis, This is exactly what I was looking for! You made my day. Thank you 🙏

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·
  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Thank you so much for sharing your feedback ​Ammar K.​!