Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Local Filter only for a chart

Hi,

There are multiple sheets in our application and I have a scenario where I have to create a local filter X for a particular chart in a particular sheet 'SheetMain'. The first sheet is application is FilterSheet where we have list of all the filters present in the whole application. This filter X is also present in this FilterSheet where user can select 'Yes' and 'No' value for this.

Requirement is, in SheetMain, the chart should be only visible for filter X -> Yes value. It should not be affected by any selections done for filter X on FilterSheet.

The chart value should alws display value for X-> yes values.

Note: This X filter is also present for user selections in FilterSheet.

X filter should not be set to Yes value for whole application.

Kindly suggest how to achieve this scenario.

Thanks in advance !!

2 Replies
sudeepkm
Specialist III
Specialist III

You can achieve this by creating another field with Yes and No value in a table (Island) and that is not connected or associated to your rest of the Data model. Example like below.

FilterXTab:

load * inline [

FiltXnew

Yes

No

];

So now you have two Fields "FiltX" (the old one which is present in your data model) and "FiltXnew" the field which is not associated to other fields.

Now go to the particular sheet where you just want to use this new FiltXnew field (not the one which is present in the other sheets)

In the chart expression do like below. Suppose you are showing sum(SalesAmount) then you can create the expression like below

sum({< FiltX={"$(=GetFieldSelections(FiltXnew))"} >}SalesAmount)

Please make sure the Chart to be defaulted to some value.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I am not sure exactly what you are trying to do, but there are no "local" filters in QV. The filters always filter the entire data set for all chart objects (although you can override or modify selections in individual chart objects using a set expression).

You can create something a little like a local filter by creating an alternate state which can be applied to a sheet object or to a sheet, and you could use one alternate state per sheet, if needed. Then use a show conditional (Properties | Layout for the chart) that refers to the alternate state. Search in the forum for more information on alternate state.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein