Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error when using alternate states in

Hello,

I'm creating a dashboard that compares the responses of two organizations to the same survey. I'm using alternate states so that the user can see the results from the two organizations while also having the option to further filter the data from each organization independently. I would like to create an expression that subtracts each organization's scores on a particular question while still taking into account the filters placed on the alternate states, but I'm having difficulty doing so. The expressions are rather complex, so I've simplified them below (I'm getting the same error regardless). Could someone help me diagnose what's going on?

Sample expression:

=Avg({View 1} Response) -Avg({View 2} Response)

Where "View 1" and "View 2" are my alternate states, and "Response" is the data I'm trying to average.

When I try to run this, I get the following error: "Error: Error in expression: '}' expected". When I add single quotes, this error goes away but I just get a "0" no matter what filters I put on.

Many thanks,

Geoff

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Try to not use spaces in Alternate States or surround with brackets

Avg({[View 1]} Response)

View solution in original post

4 Replies
Clever_Anjos
Employee
Employee

Try to not use spaces in Alternate States or surround with brackets

Avg({[View 1]} Response)

Not applicable
Author

Thanks so much, Clever! Works perfectly! What do brackets in expressions do, for future reference?

Clever_Anjos
Employee
Employee

They do what you need They isolate a field name or alternate state name with spaces as a single name

Not applicable
Author

Really appreciate it, Clever!