Showing results for 
Search instead for 
Did you mean: 

setFilter option on DataSource doesn't work if dimension value don't exist in dimension members

Former Member
0 Kudos

Hello All,

I have a Listbox, filled with 13 year-period(s). For example in this case from 2015-04 to 2016-04. This listbox is filled with an script.

There is also a graph, based on an datasource. In this DataSource there is an dimension year-period.

Initially the datasource is loaded with all the 13 periods (if available). The user can change the selection of the year-period by select member(s) in the listbox. The user can - i.e. - choose only 2015-08 or the user can make multiple selections, i.e. 2015-08 and 2015-09.

The script "on select" from the listbox put an filter to the datasource of the graph with the selected members and update the graph, only showing the selected members of the dimension "year-period". Like this: DataSource.setFilter("year-period", listbox1.getSelectedValues());

It all works fine exept when the user wil select an item on the listbox what not exist as an member on the dimension in the initial loaded datasource.Then there is no filtering at all, all the members are shown in the graph.

If, for example, year-period 2016-04 is not available in the datasource (only the periods 2015-04 to 2016-03 are available in this case), and the user select year-periode 2016-04 from the listbox there is no filtering. It seems that the filter is deleted. All the members of the dimension are shown in the graph now (there are 12 columns now, for each year-period one). If the user selects 2016-03 (available in the datasource) only one column is shown.

I expect - if the user selects an item in the listbox which is not a member of the coresponding dimension in the datasource - there will be no members viisble on the graph.

Do I something wrong? Is there any way to correct this?

Thanks in Advacne.

Release is 1.5, Version 15.0.6.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Wim,

This is default behavior in Design Studio. It ignores invalid filters that are applied.

Quick question: You have used 2 data sources, one for chart and another one for populating listbox. Why don't you use the same data source/query for populating listbox that is used in chart?

By doing this, you will have same months between listbox filter and chart.



Former Member
0 Kudos

Hi Arnand,

Tnx, this explains those behavior.

We have on our dashboards several domains / sources together with different year/period available in the data. Not every source is unfortenately up to date.

Of course we need to organize this (by adding the factless facts to the datasource(s) to create uniformity on the common dimensions) but that has to wait at this moment.

For now, I checked if the selected value from the listbox is in the datasource, if no then I give a message that no data is available en no filters are changed. If yes I use the filter.



Answers (0)