Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disregarding a selection in a dimension

Hi,

I am working on a QlikView file for a big client, which will replace a PowerPoint based reporting.

In this reporting there is a sheet with two charts located directly above each other.

The first chart (bar chart) shows the performance of n variables for one single brand and one year (brand and year selected from list boxes)

The second chart (line chart) shows the performance of another variable for the same brand as above, but over time (time being the dimension).

The problem is, that the selection of a single year for chart 1 results in limiting the dimension to this single value in the second chart.

Does anyone of you know a way how to disregard the selection of a variable in the dimension of a chart? I thought that set analysis may be an option
(with something like {$<year=>}), but searching the forum let me find out, that set analysis is not possible in dimensions 😞

Does anyone of you know of a solution?

Thanks in advance,

Steffen

1 Solution

Accepted Solutions
Not applicable
Author

It may help to give us an example of what your data looks like.

Set Analysis isn't used in dimensions, but the dimensions are displayed based on what comes up in your expressions. Your dimensions are probably only filtering, because there is nothing in the expression to display.

In Set Analysis, to ignore selections, use:

Sum({1} Sales)


Try putting that into your expressions and see if your dimensions show up.

You could also go into the Presentation tab of your chart and try unchecked Suppress Zero-Values. That would display the dimensions where the expression equals zero, those are the items that would otherwise be hidden and would probably be resolved by using the Set Analysis above.

View solution in original post

5 Replies
Not applicable
Author

It may help to give us an example of what your data looks like.

Set Analysis isn't used in dimensions, but the dimensions are displayed based on what comes up in your expressions. Your dimensions are probably only filtering, because there is nothing in the expression to display.

In Set Analysis, to ignore selections, use:

Sum({1} Sales)


Try putting that into your expressions and see if your dimensions show up.

You could also go into the Presentation tab of your chart and try unchecked Suppress Zero-Values. That would display the dimensions where the expression equals zero, those are the items that would otherwise be hidden and would probably be resolved by using the Set Analysis above.

Not applicable
Author

Thank you very much for your quick response. I created a simple example (attached to this post), and your suggestion worked.

Too bad my real data is not that simple 😞

It looks like I will have to add the set function {<year=>} to more than 70 individual terms of aggregate functions (which are already using a lot of set analysis). The single expression I am plotting in the bottom chart is more than 75 lines of code long (>5000 characters) - this may take a while...

Thank you very much for your quick help,

Steffen

Not applicable
Author

Wow, how do you even edit those expressions in the tiny box that QlikView gives you? Smile

One trick that you can use to simplify long Set Analysis expressions (or any expression) is to use variables and dollar sign expansions. Set your variable up to be something like:

{<year=>}


And then inside your expressions, you can use:

Sum($(vVarName) Sales)


Obviously, that's not saving you any typing in this example, but if you have a lot of longer, repeated expressions, it may help a bit. You can even use parameters in your variables (like a function), but I haven't used those enought to give an example off the top of my head.

Not applicable
Author

No, I wrote the full expression in UEDIT, and then copied it into this tiny QlikView Editor. A real editor in QlikView would be a nice addition.

Thanks for the hint on using variables in set analysis. It may be useful for my project...

johnw
Champion III
Champion III

This may not apply, but if the chart that only makes sense with some selections has only a few expressions in it, you could change it instead of the big chart with the large number of expressions.

In your example, for instance, you could create "Brand for Chart" and "Year for Chart" fields disconnected from the main data model and forcing one and only one selection. Then your expressions could be something like:

avg({<brand={$(="Brand for Chart")},year={$(="Year for Chart")}> v1)

Then they aren't actually selecting anything that would affect the second chart, so none of its expressions need to be changed. It's just pushing the work into a different chart, but maybe it'll work for your case.