Help

In desperate need of help with my formula

Topic Labels: Formulas
Solved
Jump to Solution
2948 12
cancel
Showing results for 
Search instead for 
Did you mean: 
Lena_Osorio-Gem
5 - Automation Enthusiast
5 - Automation Enthusiast

I am creating a table where our team enters LinkedIn social media analytics. I have only dabbled with formulas, so I went to my friend for help, and he gave me a good formula, but I think it needs tweaking.

Here is my dilemma:

First, I want the “Click-Through Rate” to display “Not Available” for future posts. For current posts (as well as past posts); I would like to display a number, even if it’s zero.

If you notice in my screenshot, there were certain past posts with data entered, but it doesn’t display anything in the Click-Through Rate cells. :woman_shrugging:t5:

Second, I would like to display the Click-Through Rate as a decimal that moves the decimal point. For example, instead of displaying 0.0198, I would like for it to display, 1.98%

Here is the formula:

IF({clicks} > 0, ROUND({Clicks}/{Impressions},2), if({Impressions} >0, ROUND({Clicks}/{Impressions},2), “Not Available”))

Picture1

I appreciate any and all help.

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community!

By “current and past posts” do you mean posts with impressions?
You can try a simpler formula. Use the formatting options to format the result as a percent. Note that the formatting options are not available with your old formula because your old formula returned a text string, and not a number.

IF(
  {Impressions},
  {Clicks}/{Impressions}
)

This formula will not show “Not Available” because if you do that, you loose the ability to format the result as a number. Instead, this will leave the field blank if there are no impressions.

See Solution in Thread

12 Replies 12
augmented
10 - Mercury
10 - Mercury

Hi Lena. Just a few things should fix up your formula field.

  1. Make your first “IF” test {Clicks} >=0
  2. Take out the ROUND functions - will take care of that next
  3. Select the “Formatting” tab (beside the “Formula” tab in the field editing window) and change the format to Percentage and select the precision that you want.

Good luck!

Thanks for replying. I will give that a try and let you know. :slightly_smiling_face:

Thanks for helping. I made the changes but it wouldn’t save the formula. It kept saying, “Invalid formula” :frowning:

kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community!

By “current and past posts” do you mean posts with impressions?
You can try a simpler formula. Use the formatting options to format the result as a percent. Note that the formatting options are not available with your old formula because your old formula returned a text string, and not a number.

IF(
  {Impressions},
  {Clicks}/{Impressions}
)

This formula will not show “Not Available” because if you do that, you loose the ability to format the result as a number. Instead, this will leave the field blank if there are no impressions.

Great point, Kuovonne! I’m such a doofus. When I don’t replicate something myself, I tend to miss obvious things.

If it were me, I would have a filtered view to remove the campaigns without impressions, if necessary for UX.

For current and past posts that have “0” clicks, I need for it to display a number result in the “Click Through Rate” column. If I can’t have a percentage, that’s fine, but I would like for it to show a number result, even if it’s zero.

Hopefully, that makes sense. Right now the line items that have “0” clicks are not showing anything in the Click Through Rate column. It’s just empty.

Can you share a screen shots of your current formula configuration and of your data?

image

image