Skip to Content
May 09, 2016 at 11:57 AM

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


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.