Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

ignoring selections in set analysis

Hi,

I would like to ignore selections (made in a list box) for expressions used in my pivot table.

I used following expression in the table for Max Year:

MaxYear expr:

sum({< Year = {$(vMaxYear)},Year = ,Quarter = ,Month = >} Sales)

Previous Yearexpr:

=sum({< Year = {$(vPreYear)},Year = ,Quarter =,Month = >} Sales)

above two expr have different data for max year and previous year but I am getting same values for both years.

If we remove ignore conditions(Year =,Month 😃 the Values are correct but i am unable to ignore the selection.

i have attached one sample app for your reference.

11 Replies
robert_mika
Master III
Master III

Try:

For all selection

MaxYear expr:

sum({1< Year = {$(vMaxYear)},Year = ,Quarter = ,Month = >} Sales)

Previous Yearexpr:

=sum({1< Year = {$(vPreYear)},Year = ,Quarter =,Month = >} Sales)

For current selection

MaxYear expr:

sum({$< Year = {$(vMaxYear)},Year = ,Quarter = ,Month = >} Sales)

Previous Yearexpr:

=sum({$< Year = {$(vPreYear)},Year = ,Quarter =,Month = >} Sales)

grajmca_sgp123
Creator
Creator
Author

Hi Robert Thanks for your quick reply,

Have you opened my attached sample qvw,I have tried all the ways but not getting correct values.

the values are not correct here

Product Total Sales sum({$< Year = {2015},Year = >} Sales) sum({$< Year = {2014},Year = >} Sales)
385 385 385
A385385385
robert_mika
Master III
Master III

I'm at home using PE version.

Could you attached data set you are using?

maxgro
MVP
MVP

in your expression for max year

sum({< Year = {$(vMaxYear)},Year = ,Quarter = ,Month = >} Sales)

remove Year=

the expression should be

sum({< Year = {$(vMaxYear)},Quarter = ,Month = >} Sales)

and also for previous year expression;

the result is

1.png

grajmca_sgp123
Creator
Creator
Author

here I have attached my sample data set

grajmca_sgp123
Creator
Creator
Author

yes Values are fine but month and Quarter selections not ignored.I am wondering why selection will work if we ignore also.

see the attachment

Product Total Sales sum({$< Year = {2014},Quarter = ,Month = >} Sales) sum({$< Year = {2013},Quarter = ,Month = >} Sales)
15 145 0
A151450
maxgro
MVP
MVP

because in set analysis

Month=

is for disregard Month

but you're selecting in the

MonthID field

Month and MonthID are different fields

grajmca_sgp123
Creator
Creator
Author

no i selected month only not monthID

maxgro
MVP
MVP

if you select in Month

Jan or May or Jun or Jul

you get always the same result (240 for 2015 and 145 for 2014)

1.png

If you select in Month Feb the result change, you don'thave data for Feb in 2015 so you get 2014 for max Year (145) and 2013 (0)

The selection in Month hasn't effect on the expression, you always get all the year

1.png

If you select in MonthID the selection has effect on the expression

1.png

Do you agree?