Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
Hi,
May be like this in your expression
Sum({<Dim2=>}Value)
That should work. I forgot that you can write the set analysis like that. Thanks!
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.
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
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.
Can you post a picture of your chart?
-Rob
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.
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
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.