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: 
Not applicable

GetCurrentField use in cyclic group

I'm trying to use GetCurrentField() to individualize the expression for each field in the cyclic group, but it doesnt seem to be working. My whole expression is currently:

=count({<GetCurrentField(group_name)={'<NULL>'}>} [field])

The expression editor says the expression above has an error. However, if I take out the surrounding text and just have "=GetCurrentField(group_name)", the expression returns the name of the field. Also, if I just substitute the cyclic group field into the location of the function GetCurrentField(), qlikview also returns the correct result.

I'd appreciate any help as to why it doesn't work when I combine the two expressions. Thanks!

1 Solution

Accepted Solutions
Nicole-Smith

Create a variable (let's say vGroup) and define it as:

='[' & GetCurrentField(group_name) & ']'

Then your expression should be:

=count({<$(vGroup)={'<NULL>'}>} [field])

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Stephen,

In set analysis, it is allowed to use only explicit field names, no expressions here

=count({<FieldNameHere={whatever}>} [field])

Edit: it makes sense to try with variables though..

iktrayanov
Creator III
Creator III

Try to use dollar sign expression.

=count({<$(GetCurrentField(group_name))={'<NULL>'}>} [field])

Nicole-Smith

Create a variable (let's say vGroup) and define it as:

='[' & GetCurrentField(group_name) & ']'

Then your expression should be:

=count({<$(vGroup)={'<NULL>'}>} [field])

Clever_Anjos
Employee
Employee

Try to use

sum({<$(=GetCurrentField(GH))={'A'}>}Expression1)

Anonymous
Not applicable
Author

Yes, it does work, to my surprise.  I had to add [] because some fields had spaces:

sum({<[$(=GetCurrentField(GH))]={'A'}>}Expression1)

Not applicable
Author

I have a question to you..

If I declare a Group name like '>>Group1' or '<<Group' is it possible to write expression with that Name?

Please let me know.

Thanks you all.

chrissurguine
Contributor II
Contributor II

Hate to bump an old thread, but in the interest of those who use this solution, this didn't work for me, and I had to change it. The ampersands seem to mess things up in the final set analysis expression.

='[GetCurrentField(group_name)]'


Final expression is the same as Nicole's original:


=count({<$(vGroup)={'<NULL>'}>} [field])