Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make some filters affect a chart and other filters not affect it?

Hi,

I have a sales by year trend line chart in QLik sense. I also have year,age,gender,segments etc. as filters.

Now, I would not want my trend line to be affected by the year filter but by all the other filters.

How should I write the sales set expression for the same.

Any help would be appreciated.

Thanks,
Sowmya

1 Solution

Accepted Solutions
reddy-s
Master II
Master II

As Sunny mentioned, a set analysis expression will solve your issue

You can also use this:

sum(<{ Year =  }>Sales)

View solution in original post

8 Replies
sunny_talwar

Add it like this to your expression:

{1<Year = $::Year>}

Alternatively, you can also try this:

{<Age, Gender, Segments, ...>}

reddy-s
Master II
Master II

As Sunny mentioned, a set analysis expression will solve your issue

You can also use this:

sum(<{ Year =  }>Sales)

sunny_talwar

sangram‌, I might be wrong, but it seems the OP wants the chart to change based on year and not others.

reddy-s
Master II
Master II

Hi Sunny,

Thats fine! But the query above says , the person does not want the Year filter to work.

sunny_talwar

You are right, I missed 'not' . My bad

Not applicable
Author

Hi ,

Thanks Sangram and Sunny!

I think you meant sum( {< Year =  >} Sales) and not sum(<{ Year =  }>Sales).

And it definitely works for every other field i add apart from year. for e.g: sum( {< Age =  >} Sales) or something similar is working by restricting filter on Age.

What I would like to clarify is my year field comes from a date field by using the Qlik auto generated year field.(screenshot below).

Capture.PNG

When I add the date field directly to filter pane and use sum( {< Snapshot Date =  >} Sales) it works!!

But sum( {< [Snapshot Date.autoCalendar.Year] =  >} Sales) does not.


Any suggestions?

Not applicable
Author

Update to above:

I tried deriving the year field from date field in script and used the new field instead of the auto generated field and it works.

My understanding is that this that happens with auto calendar generated date fields!! not sure why though.

Thank you once again!

reddy-s
Master II
Master II

HI Sowmya,

Is it possible to share the app?