Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Square brackets in getcurrentfield func

Hi all.

Does anyone has problem with calculation getcurrentfild value, using in aggregation function?

My test dimensions, contained in cycle group are:

Company id,

Customer id

That's why i tried to use square brackets in the expression:

sum(aggr(sum(Sales), '['&GetCurrentField("Test")&']'))

Thanks for advices.

There's model and source file in the attachment. !

2 Replies
swuehl
MVP
MVP

Try a dollar sign expansion:

sum(aggr(sum(Sales), $(= '['&GetCurrentField("Test")&']') ))

Anonymous
Not applicable
Author

I see original user did not reply, but thanks for this, Stefan.  My drill down groups were not working in a scatter chart past a certain dimension, and I noticed that it started to happen when the dimension name had a space in it (which I generally try to avoid, but this was an external data set with some constraints around naming conventions).  By concatenating brackets into the expression string, it solved the issue.  If anyone else is using GetCurrentField in a drill down group and getting a "No Data to Display" error, I recommend checking spelling and case in the group fields, and if all is well there, try this if you have a space in the field name.