Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Jagsfan82
Partner - Contributor III
Partner - Contributor III

Calculated Dimension in List Box (If Statement) crashes QlikView

Hey All,

I created a dynamic chart that will change based on user selections.  I then created two list boxes below that will populate based on the dimensions and expressions selected by the user.  The options the user has are in list boxes and include dimensions, left axis expressions, and right axis expressions.  Behind the scenes the dimension list box is linked to an inline table that lists the dimensions I would like the user to have the option of selecting.  

If I use the code below, everything works fine, but this will only look at the first dimension selected for both list boxes, and if the user selects two dimensions I would like them to be able to get an alternative view of both dimensions.

=$(='[' & Subfield(Concat(%vsMainDimension,'|'),'|',1) & ']')

If I provide this option with the code below for the second list box, and the user selects multiple dimensions, the application will stop responding and be forced to close using the typical "Not Responding" dialogue box.  The code is below.  It's supposed to check how many dimensions are selected, and if there is more than 1 selected populate the list box with the second dimension.  

=If($(vs_iDimCount)>1,$(='[' & Subfield(Concat(%vsMainDimension,'|'),'|',2) & ']'),$(='[' & Subfield(Concat(%vsMainDimension,'|'),'|',1) & ']'))

I checked what would happen if I switched the condition and I got the same result.  Code is below:

=If($(vs_iDimCount)=1,$(='[' & Subfield(Concat(%vsMainDimension,'|'),'|',1) & ']'),$(='[' & Subfield(Concat(%vsMainDimension,'|'),'|',2) & ']'))

This doesn't seem like a complicated statement, but clearly there is something more going on here I am unaware of.  Is there an alternative way of accomplishing this?  Basically my goal is for the second list box to display the second dimension if more than one are selected.

Thanks for any help.

Broken List Box.PNG

1 Reply
Brett_Bleess
Former Employee
Former Employee

I would recommend attaching the application on this one, so folks can look over everything to try to determine what may be going wrong.  You can likely reduce the data, but there will need to be some so folks can look at the data model and everything else.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.