Does anyone see a mistake in writing my formula? I will be grateful for your help. I’ve been fighting it for an hour now.

# Help to repair the formula

**Ander**#2

Are `Date`

and `daterangepicker1`

the same data types? (One appears to be Date, while the other appears to be Date/Time.)

hi @Ander

Thank you for your suggestion but It doesn’t look like that’s the cause. In another cell, both of them work together properly.

file: https://coda.io/d/Likert-Scale-embed_di0Xm-14ByK/_su2dE

**Nick_Milner**#6

It looks like there’s a missing dot after the filter - it just runs right into the SquareRoot with a space.

Would you care to explain what is the desired outcome? You filter a table, then try to square root a number, then count the number of rows?! Honestly I can’t make any sense of it.

I try to count the square root by referring to the table data for a given period of time.

Below is an example of using the same formula that works. The only difference is that there is no filtering.

**Nick_Milner**#10

Well, it *was* that because the error message has changed. Now it’s something else.

It’s going to be easier if you just share the doc so we can take a proper look, but now it looks like inside the SquareRoot function you’re trying to divide the sum of a list of numbers by a list - you can’t divide a number by a list.

Notice in the version that works you’re dividing the sum of a list of numbers by the count of a list of numbers (i.e. dividing a number by another number) - do you just need to move the close bracket of the SquareRoot function to *after* the Count() instead of before it? That way it will match the version that works.

**Przemek_Sawicki**#11

The link to the file is in the post at the beginning. Anyway, I also share the file below:) Thank you for your help.

**Nick_Milner**#17

There are two ways you can write formulas in Coda. You can either do:

`a.sum()`

or:

`sum(a)`

They both take a list of numbers and sum them up. So far so straight-forward.

But what happens if you try and mix the two ways? What happens if you do something like this?

`a.Sum(b)`

If you’re writing formulas like this it’s likely that you’ve gone wrong and you need to take a step back and think about what you’re doing. You’ll either end up with a formula that doesn’t work because it has an error (like above) or you’ll end up with something that works but is a bit strange. Like this:

The first number (15) is the sum of all the numbers from Column 1 that are greater than 2: 4, 6 and 5.

The second number is the same sum but with Column 2 specified inside the Sum function. How does it get to 28? It does the same sum as the first example to get 15, then it adds on everything in Column 2. It works, but is it meaningful? Is it easy to understand to someone else? I’d say it’s better not to write formulas like this.

**Przemek_Sawicki**#18

Your help is invaluable. Thank you very much. I still have to practice everything you have written. Step by step but I hope that my skills will move in the right direction.