Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

If statement in calculated dimension breaks the selection

I have a table with conditionals shows.

The enduser can select which dimensions he wants to view.

To make it possible i have a listbox (data island) where selections can be made. This works fine.

But now i want to make it more end-user friendly (in the end solutions there are alot of fields to select), i want to split the listboxes.

I do this by adding a calculated dimension to the listbox =If(Tag = 'Order',Field)

The problem is then that is it NOT possible to select a field in both listboxes. So it's not possible to select a field in the client list and a field in the order list.

How can i solve this?

I tried to create a data-island for both client and orders. This will work, but the thing is that i need to proper sort order of the dimensions. And this is a mix of both client fields and order fields.

See attachment ! Thanks in advanced

14 Replies
amien
Specialist
Specialist
Author

yes!

Its basicly the samen solution. The NorthWind solution give order in the Dimension selections using a treeView. i want the same thing, but the with separate listboxes (which i can put in a container).

Gysbert_Wassenaar

I think you'll have to combine it with this technique of using alternate states then: Using Alternate States to Select Multiple Values in a List Box with Different Attributes


talk is cheap, supply exceeds demand
kuba_michalik
Partner - Specialist
Partner - Specialist

Not necessarily impossible.

You could write a macro that would remove all dimensions from the table, then add them back in order specified in the data, with the proper show/hide conditions referring to an appropriate data island, based on value of the Tag field.

This would not be a user-facing macro - only the developer would have to run it when the dimension sort order was changed, so most of the usual caveats about using macros in Qlikview would not apply. If you don't have a specific requirement about rearranging the dimensions by updating e.g. a spreadsheet, without any developer input, then this could be a pretty maintainable solution. But then again, I'm not sure how well would a table with 700 dimensions work, even if 99% of them were conditionally disabled 😕

kuba_michalik
Partner - Specialist
Partner - Specialist

And here's my third and (I think) final brilliant idea

Summary: data islands, use set analysis to merge selections in data islands into a selection on the main Field field

amien
Specialist
Specialist
Author

@Jakub .. that is indeed brilliant

Thanks