Skip to Content

Dimension filter to filter a non binded data source

Oct 18, 2017 at 11:35 PM


avatar image



I want the selection from a Dimension filter to filter a non binded data source, but I cannot get it working and I’d appreciate assistance.



  • dimension_A
  • dimension_B


  • dimension_B
  • Note: dimension_A cannot be included in DS_2 query

Dimension filter data binding:

  • Source: DS_1
  • Dimension: dimension_A


When dimension_A value(s) are select from the Dimension filter, I want DS_2 to be filtered based on the dimension_B value(s) associated with each dimension_A value(s) selected.How do I achieve this?

At the moment the On Apply script of the Dimension filter is as follows:

dimension_B_List_Array = DS_1.getMembers("dimension_B_id", 1000);

var dimension_B_List_String
= "";
dimension_B_List_Array.forEach(function(element, index) {
dimension_B_List_String = dimension_B_List_String + element.externalKey +
DS_2.setFilter("dimension_B_id", dimension_B_List_String.split(","));

However, dimension_B_List_String variable contains all dimension_B values for all dimension_A values, not just the dimension_B values for the dimension_A values selected in the Dimension filter.

I’d appreciate assistance with getting my desired outcome.

Design Studio 1.6 SP3

Source: Universe


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mustafa Bensan Oct 19, 2017 at 04:59 AM

Hi Greg,

Try replacing your entire script code above with the following line of code:

DS_2.copyFilter(dimension_B, DS_1, dimension_A);



Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Mustafa,

Thanks for your reply.

That doesn’t work.Using your script, doesn’t copyFilter require dimension_B in DS_2 and dimension_A in DS_1 to have the same values? If so, that is not the case.

dimension_B in both DS_1 and DS_2 are exactly the same distinct values.

The dimension filter with dimension_A must be bound to DS_1.

DS_2, which cannot have dimension_A in its query, then needs to be filtered based on the selection (of dimension _A) in the Dimension filter.The common dimension between DS_2 and DS_1 is dimension_B.

Any further thoughts to solve this?

Thanks in advance.



Hi Greg,

Okay, I understand the requirement now. This is a cascading filter issue which in the past has been problematic with Design Studio for Universe data sources. Please try the following:

1. In the Initial View Editor for DS_1, make sure that the Members for Filtering settings for dimension_A and dimension_B are set to "Only Values with Posted Data" similar to the screenshot below:

2. Implement the following code in the "On Apply" event script of the dimension filter:

var dimension_B_List_Array = DS_1.getMembers("dimension_B_id", 1000);
DS_2.setFilter("dimension_B_id", dimension_B_List_Array);




Oh nice one Mustafa.

The cascading prompt on DS_1 was the missing link for me. That, and your simplified script, did the trick.