I want to sum up the number of times a string field has values

I have survey data I ingested into QS and one of the fields has text if they selected it or is blank if they didnt. When I pivot, it shows the count for all 295 fields but i just want the number of fields that are not blank to show Eg. Colum has “Text” 165 out of 295 times. What is the easiest way to go about this?

ifelse(
locate({Q11_1},“text displayed entered here”.”) > 0,
“1”,
NULL)

Hi @justinjp maybe you can try something like this:

ifelse({Q11_1}=“”, NULL, {Q11_1})

This is assuming there is an ‘empty’ string in the cell. If there is a space then would want to put a space in between those two quotations.

@Jesse that didnt work - kept getting syntax error

@justinjp You are getting a syntax error when trying to save the calculated field? Can you send a screenshot of your formula?

Hi @justinjp. Checking in. Hope you can send the screenshot that Jesse requested, We’d still like to help, so please send it over if you can. If we do not hear back in the next 5 days, we will archive the question

The value returned of the ifElse condition must be the same data type.

I’ve tried below scenario, it works. Can share your screenshot?
ifelse(locate({Order ID}, ‘EMEA’)>0, “1”, NULL)

1 Like