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: 
morenoju
Partner - Specialist
Partner - Specialist

Using Set Analysis to ignore filters

Hi all,

I know this has been asked a lot of times, but no matter what I've read in other posts, I don't manage to get a expression that works for me.

I'm making a chart comparing current speeds to historical speeds. For the current I'm using:

avg({1}{<link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

This way I get the most current (maximum timestamp) speed values. The problem is that I'm using some filters such as WeekOfDay (Monday, Tuesday... etc.) that work fine for the historical, but not for the current.

E.g. Today's Wednesday. If I choose Tuesday as WeekOfDay, I see the historical speed average for Tuesdays (good) but the current speed graph is gone since today is not Tuesday.

It makes sense, but I want make the current speed expression ignore filters, so it never disappears no matter the filter selections.

Any help?

Thanks much!

1 Solution

Accepted Solutions
morenoju
Partner - Specialist
Partner - Specialist
Author

Looks like this is working for me:

avg({1}{<link_WeekDay=, link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

I can add conditions like the one in bold for all filters I want to ignore.

View solution in original post

8 Replies
sunny_talwar

I think you are placing your {1} outside of your other set analysis... try this

Avg({1}{1<link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

morenoju
Partner - Specialist
Partner - Specialist
Author

Sunny, somehow I lose the historical chart if I do that change. Not sure why.

The historical speed expression is just a simple Avg(speed_mph)

sunny_talwar

May be all you need is this?

Avg({1}speed_mph)

morenoju
Partner - Specialist
Partner - Specialist
Author

But the historical, does have to be affected by the filters. That's why I don't want to use a {1} there.

sunny_talwar

So you have two expressions

1) avg({1}{<link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

2) Avg(speed_mph)

If you change your first expression to this

Avg({1<link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

you are saying that your second expression stop showing historical?

How can that be true? I mean we are not even changing the second expression... why would that one stop working?

morenoju
Partner - Specialist
Partner - Specialist
Author

Looks like this is working for me:

avg({1}{<link_WeekDay=, link_timestamp={'$(=Max({1}link_timestamp))'}>}speed_mph)

I can add conditions like the one in bold for all filters I want to ignore.

sunny_talwar

Great

morenoju
Partner - Specialist
Partner - Specialist
Author

Thanks!