# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Ignoring selection in dimension

Hi,

I have an application containing data for 4 years. Year is a field the user can select - but only one year at a time (Always one selected value).

I know how to use set analysis in expressions to show data from "not selected" years... But, in one chart I would like to show all years as dimension. How do I do that?

Nils

1 Solution

Accepted Solutions
MVP

Like this, for example:

sum({<Year=>} Sales

Having nothing after the equals sign tells it to IGNORE selections in that field for the purpose of that expression. I believe that as long as you return a value for the Year, like the above would, that using Year as your dimension would give you that Year, even if it is excluded by the selections.

11 Replies
MVP

Like this, for example:

sum({<Year=>} Sales

Having nothing after the equals sign tells it to IGNORE selections in that field for the purpose of that expression. I believe that as long as you return a value for the Year, like the above would, that using Year as your dimension would give you that Year, even if it is excluded by the selections.

Not applicable

Hi there, you can accomplish this with set analysis, use year as a dimension for the disired chart and use similar expressions to the following:

sum( {\$<Year = P({1}) >} Amount)

Contributor III

Hi,

This is correct if I need data from more than one year in EXPRESSION, but I need all years shown as DIMENSION.

Best regards

Nils

MVP

nilsGC wrote:but I need all years shown as DIMENSION

Which is exactly what happens if you do what either of us said. See attached.

Contributor III

It works - not completly logical, but it works

Thank you, both 😉

Best regards

Nils

MVP

Yeah, I agree. It doesn't really make sense. It seems like we should be doing something with the dimension instead, since that's what we're trying to fix.

Not applicable

Hi Nils, i can't really think on a case where you need a chart with only dimensions and without any aggregation function, what john and I try to say, is that if you use the year as a dimension and you select all the years with set analysis, your chart will display and calculate the expression over all the years in you data model. Perhaps you can be a little more specific on your situation if this does not help you.

Regards

Not applicable

I guessed i typed slower than you guys on my last post. Actually I recommend that you always filter dimension values within set analysis, rather than in the dimension. If you do it with a calculated dimension your ability for sorting will be lost.

Regards

Contributor

How would you alter this to sum for only the most recent Date period (selected or not)? If you have all years selected but want the sum for only the most recent year?