Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
dselgo_eidex
Partner
Partner

Disable selection of a specific chart dimension, but not both

Hello, I have a bar chart with two dimensions on it. I want to be able to select on the primary dimension, but not the secondary one. Is there a way in QlikView to disable chart selection for one dimension, but not the other?

I know that I can check the "Read Only" box on the general tab, but this will disable selections on both dimensions. I also know that I can lock the field in question, but I want the user to be able to make selections on the field, just not in the chart.

EDIT: I mistakenly made a duplicate of this question here: https://community.qlik.com/thread/266314

It's pretty much the same problem, but I'm asking about two different ways to go about solving this issue. Separate alternate states and disabling chart selections.

1 Solution

Accepted Solutions
dselgo_eidex
Partner
Partner
Author

One idea that I have come up with is to put a lock on all of the fields that I don't want to be selected within the chart. This way, it won't be possible to select anything in the chart, and the only way to change the selection is via a listbox in an alternate state. Is this a good idea? I feel like it is a huge workaround, but I can't think of anything else.

View solution in original post

9 Replies
ahaahaaha
Partner
Partner

Hi,

May be like this in your expression

Sum({<Dim2=>}Value)

dselgo_eidex
Partner
Partner
Author

That should work. I forgot that you can write the set analysis like that. Thanks!

dselgo_eidex
Partner
Partner
Author

Actually, as I looked into it, this won't work. Any selections on that field won't affect the chart if I include that in the expression, but it will affect the possible dimension values on the x-axis.

For instance, I have 20 countries currently selected that are on my x-axis (dimension 1). I then have years as dimension 2. When I click on a year, it limits the possible countries to those that only have data for that year. So even though my chart expression is set to ignore selections, my state has been altered and the countries I am showing are fewer across all of my charts.

Ideally, when I click on that dimension in the chart, nothing should happen.

passionate
Specialist
Specialist

Hi,

While loading the Dimension load it twice in load script:

Dim2 and Dim2ForChart

Use the same expression

Sum({<Dim2ForChart=>}Value)

This will work i guess.

Regards,

Pankaj

dselgo_eidex
Partner
Partner
Author

I don't think this will work either. The problem is that selecting the values on the chart will affect my select state. If I just copy the dimension then it won't change anything.

rwunderlich

Can you post a picture of your chart?

-Rob

dselgo_eidex
Partner
Partner
Author

One idea that I have come up with is to put a lock on all of the fields that I don't want to be selected within the chart. This way, it won't be possible to select anything in the chart, and the only way to change the selection is via a listbox in an alternate state. Is this a good idea? I feel like it is a huge workaround, but I can't think of anything else.

View solution in original post

rwunderlich

The alternate state idea is interesting. You could put the chart in an alternate state and have your expression reference the default state. The tricky part would be knowing when to copy the alternate state selection for the primary dim only when the selection was made in the chart.

The reason I asked for a picture of your chart is that a simple solution may be to place a transparent textbox over your legend, thereby making it un-selectable.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

dselgo_eidex
Partner
Partner
Author

I thought of the same thing Rob. The problem is that my chart is using a cyclic as its secondary dimension, so the legend tends to change size quite frequently. I could limit the number of characters to keep it consistent, but I was saving that as a last ditch effort if I couldn't find a better solution. I also want to apply this solution to other charts, so having to manage each of those transparent boxes seems like it would eventually lead to issues.