Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

morenoju
Contributor II

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
Contributor II

Re: Using Set Analysis to ignore filters

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.

8 Replies
MVP
MVP

Re: Using Set Analysis to ignore filters

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
Contributor II

Re: Using Set Analysis to ignore filters

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)

MVP
MVP

Re: Using Set Analysis to ignore filters

May be all you need is this?

Avg({1}speed_mph)

morenoju
Contributor II

Re: Using Set Analysis to ignore filters

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

MVP
MVP

Re: Using Set Analysis to ignore filters

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
Contributor II

Re: Using Set Analysis to ignore filters

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.

MVP
MVP

Re: Using Set Analysis to ignore filters

Great

morenoju
Contributor II

Re: Using Set Analysis to ignore filters

Thanks!