0

I am having a lot of trouble with this. I found the problem but don't know how to solve it. This is my query function in Google Sheets. The error it is giving me is: "Unable to parse query string for Function QUERY parameter 2: AVG_SUM_ONLY_NUMERIC"

I realized that this is happening because the values in Column Q are actually another function.

For example, Visibly one cell in column Q is "$1,338.1424" but if you click on the cell the actual contents are "=IF(ISBLANK(R12)," ",R12*L12)" I can't figure out a way to make the query function sum the values in Column Q in light of this issue. Any help would be greatly appreciated as I have not been able to find anything to help.

=query(Trades_April,"SELECT SUM(Q) WHERE W Contains 'PS'")

1 Answer 1

1

The problem is not that the cell has a formula in it but that the value "$1,338.1424" is not numeric, it is text.

Solution: Try to change the formula in the cell to this:

=IF(ISBLANK(R12)," ",VALUE(R12*L12) 

Another possibility may be: selecting the column Q and changing the format to "Number".

If these did not work, please post a link to a version of your spreadsheet (without sensitive data) and I will try to make it work.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! It didn't work until I wrapped the entire function in the value function like this: =iferror(ifna(value(IF(ISBLANK(R12)," ",R12*L12))))
I’m glad that I could at least give you an idea :) If your question has been resolved, please mark the thread as answered.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.