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

Change expression based on cyclic group

Hello,

Is there possibly a way for the user to choose what field to investigate in the expression (for my purposes in a pivot table)?

For example, I have a cyclic group with fields, say field1, field2, field3.

In the pivot table, I want to display the null count for each field as I cycle through, but if I make the expression NullCount(field1), I would have to go back into the expressions box and change the inside of the NullCount(____) to field2 or field3 whenever I want to look at the different null counts.

Is there a way to make the expression read something like NullCount(group), where the group cycles through the corresponding fields?

Thanks for the help!

Labels (1)
3 Replies
jerem1234
Specialist II
Specialist II

Try the GetCurrentField() function:

GetCurrentField(Group1)

Hope this helps!

Anonymous
Not applicable
Author

Hi Stephen,

Try this expression : NullCount( GetCurrentField( GroupName ) )

Hope this helps,

Quentin

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

just to mention when you refer to the Group Name as in GetCurrentField(Group1) or NullCount( GetCurrentField( GroupName ) ), the group name will be underlined as if it was a mistake but is just a bug with syntax highlighting, so it should work,

regards