Skip to Content

How to apply simple filter to Data Source

Mar 21 at 08:58 PM


avatar image
Former Member

I have a simple dataset with 3 dimensions and no measures. I'm looking to simply filter by team and pull the Engineer and Advocate dimensions into string variables. When working with measures this is a piece of cake, just struggling here.

I need this function, but for dimensions:

var gblTeam = "TEAM01";

var pob = DS_DATASET.getData("MeasureColumn", {
"Fleet Manager": gblTeam

Thanks in Advance!


teams.png (20.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Patrick Brophy
Mar 26 at 03:49 PM

Hello Chris,

I see that there is one Engineer and Advocate to each Fleet Manager.

So, are you trying to select a Fleet Manager and then concatenate the Engineer and Advocate into a string based on the selection?

What components are you using to achieve this?

The reason I ask is if you are using simple components such as the Dropdown Box or Listbox Components, property binding can do this for you (see the below screen shot):

In your case, you could have a global string variable retrieve the value or text from the second and third Dropdown Box Components.

Anyway, I hope this helps.

Best Regards,


10 |10000 characters needed characters left characters exceeded
Christian Hauswald Apr 13 at 12:49 PM

Dear Chris,

I am sorry, but I guess I need to disappoint you. As far as I can see, you want to Filter for one Dimension (Team) and get the resulting Element out of that selection. This is not possible with Design Studio, as you can not read the Data Source iterative. You will always get all posted values out of a dimension, when typing "getMembers....".

So even when you filter by TEAM1, you will get all names available in the System.

However, there is a workarround. If you have the possibility to install SDKs to your System, you can have a look to the "DataIterator", provided in the SCN Community:

Another hint: With Lumira 2.x Designer, it is finally possible to do a iteration through your Datasource.

Here I have a little dummy-Demo in Lumira for you:

Result on the right, when not filtered:

Result on the right, when filtered:

The coding for this function:

I hope that helps?

notfiltered.png (152.3 kB)
filtered.png (60.6 kB)
coding.png (22.6 kB)
10 |10000 characters needed characters left characters exceeded
Mustafa Bensan Apr 15 at 01:55 AM

Hi Chris,

Assuming that each Team has only one Engineer and Advocate assigned, you can apply the concept of cascading filters to obtain the Engineer and Advocate corresponding to the selected Team as follows:

1) In the Data Source Initial View Editor for data source DS_DATASET, set the Members for Filtering option of the Engineer and Advocate dimensions to "Only Values with Posted Data"

2) Apply the following script code in the "On Select" event of the Team Dropdown:

DS_DATASET.setFilter(<Team Dimension>, me.getSelectedValue());
var EngineerName = DS_DATASET.getMembers(<Engineer Dimension>, 1)[0].text;
var AdvocateName = DS_DATASET.getMembers(<Advocate Dimension>, 1)[0].text;



10 |10000 characters needed characters left characters exceeded