Skip to Content
avatar image
Former Member

How to get B dimension data after filtering it from A dimension Design Studio Universe Data Source

Hello everyone,

I'm trying to get a filtered data source from a universe data source. I have a dropdown containing month items and when choose one of those month, the crosstab updates and show me only the data linked to the month.

Now what I want to get is only the data from this filtered data. However, When i use the getMembers() function, it gives all the data from my source and not only from the filtered crosstab data source.

So if you guys, have any idea, please help.

Regards

Etienne PASCAL

Add comment
10|10000 characters needed characters exceeded

  • Hi Etienne,

    It would be helpful if you posted a screenshot showing the Dropdown as well as the Crosstab, with an explanation of which dimension you are trying to access via getMembers().

    Regards,

    Mustafa.

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 13, 2017 at 05:22 AM

    Thank you for replying.

    As you can see in the code below, I'm filtering a universe data source by the OBJ_1 which is corresponding to label month. What I want do get are the members from this filtered data.

    SOURCE_1.setFilters("OBJ_1",DROPDOWN.getselectedValue());

    var myDates = SOURCE_1.getMembers("OBJ_1", 1000000000);
    var len = myDates.length;
    var lastDate = myDates[len-1];
    TEXT_1.setText(lastDate.text);

    However, when I look at what's behind the data after filtering it, I get all the data source and not only the filtered one. My intension is to get the last date data from the month I've selected in the dropdown.

    So if you have any idea, I'll be pleased to get some.

    Regards,

    Etienne


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2017 at 07:38 AM

    Hi,

    check out

    https://www.youtube.com/watch?v=t1UTWCZ77ag

    for cascading filters

    Grtz

    Koen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2017 at 08:08 AM

    Hi Koen,

    I've seen this video before but it doesn't give what I want to get. My main question is to know there is a way to get filtered data source? because when I use the getDataSource() method , it returns all the data from my source and not only the data that I filtered.

    DATA_SOURCE_FOR_CROSSTAB.setFilter("OBJ_5",DROPDOWN_MONTH.getSelectedValue());
    var data = CROSSTAB_2.getDataSource();
    var myDates = data.getMembers("OBJ_1", 1000000000);
    var len = myDates.length;
    var lastDate = myDates[len-1];
    APPLICATION.alert(lastDate.text);

    Here the variable data always returns all CROSSTAB data and not the filtered one. For exemple my last month in dropdown box is April, so when I run the app it return the last date of April. However, when I change the month, for instance January , the crosstab shows the data linked to January but the last date still the same and the app doesn't get the last date of January ; it returns April's last date and it's the same for all the months in my dropdown box

    Etienne

    Add comment
    10|10000 characters needed characters exceeded