Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable Using Alternate State

I have a variable I am using to provide a dynamic header for a chart.  It lets users know what Release they have selected.  It is a relatively simple variable:

=If(Len(GetFieldSelections(Release)) < 1, 'All', GetFieldSelections(Release))

This works great.  However, they just asked for another chart which necessitated me creating an alternate state to provide the desired data.  I want to continue providing the dynamic title but am not sure how to change the variable to properly utilize the alternate state.  After reading through a number of posts, I thought I had found a solution but it doesn't work.  The Alternate State is called "IndividualVelocity" and the code I tried is below:

=If(Len(GetFieldSelections({[IndividualVelocity]} Release)) < 1, 'All', GetFieldSelections({[IndividualVelocity]} Release))

Any pointers on what I am misunderstanding is much appreciated.

1 Solution

Accepted Solutions
sunny_talwar

If you have older version of the application you can try to use the count instead:

=If(Count({IndividualVelocity} DISTINCT Release) < 1, 'All', Concat({IndividualVelocity} DISTINCT Release, ','))

HTH

Best,

Sunny

View solution in original post

4 Replies
sunny_talwar

The newer release of QlikView (SR8 above I think) allows for entering the state name. Please look at the attached image.

Best,

Sunny

sunny_talwar

If you have older version of the application you can try to use the count instead:

=If(Count({IndividualVelocity} DISTINCT Release) < 1, 'All', Concat({IndividualVelocity} DISTINCT Release, ','))

HTH

Best,

Sunny

View solution in original post

Not applicable

Thank you!  Works perfectly.  I have SR6 so don't have the alternate state option (tried it and it gave me a syntax error).

Thanks for the quick and complete response (i.e., taking into account both scenarios).

Mark.

sunny_talwar

Mark,

Not a problem. I am glad that I was able to resolve your issue.

Best,

Sunny