Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Techkrish
Contributor
Contributor

Error while using GetFieldSelections with string values(with space)

Hi,

I'm getting an error "Error in set modifier ad hoc element list: ',' or ')' expected" while using the below given statement
                               SUM({$<Project_Name={$(=vProject_Name)} >} Forecast_Amt)

The variable "vProject_Name" has been assigned with                                   "If(ISNULL(GetFieldSelections(Project_Name)),'*',GetFieldSelections(Project_Name))"

Sample values of Project_Name:

Clarity
BMC IT
BMC Data Hub

I'm getting error only when the project name contains space. Can someone help me to fix the issue please? Thanks.

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

In that case, try this

=Sum({1<Actual_Period = {2}, Month_Num = {2}, Project_Name = p(Project_Name)}>} Forecast_Amt)/1000

or this

=Sum({1<Actual_Period = {2}, Month_Num = {2}, Project_Name = $:: Project_Name}>} Forecast_Amt)/1000

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

Why do you even need this... why can't you just do this and let QlikView do its thing?

Sum(Forecast_Amt)

When not Project_Name is selected, it will show everything. When you select one or more Project_Name... only those will show.

Anil_Babu_Samineni
MVP
MVP

Can you check, What this is returning in KPI?

If(ISNULL(GetFieldSelections(Project_Name)),'*',GetFieldSelections(Project_Name))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Techkrish
Contributor
Contributor
Author

Please see this one. I'm using "1" in the below statement. In this, if I don't specify a specific project, it'll give me the sum of all the projects. Any solution on this? Thanks.

=sum({1<Actual_Period = {2}, Month_Num = {2}, Project_Name={$(=vProject_Name)}>} Forecast_Amt)/1000
sunny_talwar
MVP
MVP

In that case, try this

=Sum({1<Actual_Period = {2}, Month_Num = {2}, Project_Name = p(Project_Name)}>} Forecast_Amt)/1000

or this

=Sum({1<Actual_Period = {2}, Month_Num = {2}, Project_Name = $:: Project_Name}>} Forecast_Amt)/1000
Techkrish
Contributor
Contributor
Author

It's working fine! Thank you so much 🙂