Skip to Content
0

GET MEMBERS FROM FILTERED DATA SOURCES

Oct 30, 2017 at 11:32 AM

211

avatar image
Former Member

Hi everyone,

At the beginning of the report I would like to see all the values of the Checkbox group with some of the options being checked.

I expect that, checked item will change according to the selected year.

My dataset include budget versions that change according to years.

Year version

2017 2017-A

2017 2017-BV1

2017 2017-BV2

2017 2017-BV3

2016 2016-A

2016 2016-BV1

2016 2016-BV2

First, I filter the data source with the following script on the radio button select event.

DATA_SALES_UNIT_MTD.setFilter("_wVTG0HHZEeeYI-Qg6aRcTA", RADIOBUTTON_FIL_YEAR.getSelectedText());

For example, I chose 2017 from RADIO BUTTON

Then I would like to bring all versions into the checkbox group but only the 2017 versions should appear marked

with the following script, but all come with a selection.

var request = DATA_SALES_UNIT_MTD.getMembers("VERSION_DIM", 100);

CBG_VERSION.setItems(DATA_SALES_UNIT_MTD.getMemberList("VERSION_DIM", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 100));

var selections = [""];

selections.pop(); request.forEach(function(element, index) { selections.push(element.internalKey); });

CBG_VERSION.setSelectedValues(selections);

Design Studio 1.6 SP1

Source: Universe

Many thanks,

Adem

10 |10000 characters needed characters left characters exceeded

Hi Adem,

For clarification can you post a screenshot of your application showing the checkboxes, as well as a screenshot of the data source initial view?

Thanks,

Mustafa.

0
Former Member

Hi Mustafa,

I added some screenshots. At the end, I have screenshots that I expect to be.

Thanks for help.

0
Former Member

Other screenshots attached.

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Mustafa Bensan Nov 17, 2017 at 10:48 AM
1

Hi Adem,

Due to the way cascading filters work, for your requirement you need to create two separate data sources assigned to the SAME Universe. The steps are as follows:

1. Create a duplicate of your data source DATA_SALES_UNIT_MTD and call it DATA_SALES_UNIT_MTD_FILTERED;

2. In the data source initial view for DATA_SALES_UNIT_MTD_FILTERED, place the "_wVTG0HHZEeeYI-Qg6aRcTA" dimension in the Rows panel and set the Members for Filtering setting to "Only Values with Posted Data";

3. Bind the Items property of RADIOBUTTON_FIL_YEAR where:

Source Data Source = DATA_SALES_UNIT_MTD

Source Dimension = _wVTG0HHZEeeYI-Qg6aRcTA

Follow Filter State = true

Target Data Source = DATA_SALES_UNIT_MTD_FILTERED

Target Dimension = wVTG0HHZEeeYI-Qg6aRcTA

4. Bind the Items property of Checkbox Group CBG_VERSION where:

Source Data Source = DATA_SALES_UNIT_MTD

Source Dimension = VERSION_DIM

Follow Filter State = false

5. In the "On Select" event of Radio Button Group RADIOBUTTON_FIL_YEAR apply the following script code:

var mySelection = DATA_SALES_UNIT_MTD_FILTERED.getMembers("VERSION_DIM",100);

var mySelectedBudgetVersions = [""];
mySelectedBudgetVersions.pop();

mySelection.forEach(function(element, index) {
  mySelectedBudgetVersions.push(element.internalKey);
});

CBG_VERSION.setSelectedValues(mySelectedBudgetVersions);

Regards,

Mustafa.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mustafa,

This is what i want !

On the step two there is a little problem. It should be like this

2. In the data source initial view for DATA_SALES_UNIT_MTD_FILTERED, place the "VERSION_DIM" dimension in the Rows panel and set the Members for Filtering setting to "Only Values with Posted Data";

Thank you very much for your help

Adem

0

Thanks for the correction. Glad to hear the rest of it worked.

0
Mohd Fahad Oct 31, 2017 at 09:29 PM
0

Hi Adem,

I suspect the same behavior. Please see below screenshot:-

I tried few tricks before i could make up my mind and make a change at query level (Bex-Query Designer). Both below tricks didn't work, therefore i applied filter at bex level, since my requirement is different and i can live with those query hard-coded filters for now.

  1. Background Filter (Edit Initial View)
  2. On Result Set Changed (DS property)

Possible Fix?

Try creating a variable for "Date Object" and then use DS_1.setVariableValueExt(variable, value).

This will submit back the query and execute it again.

Regards,

Fahad


filter-issues.png (34.1 kB)
Share
10 |10000 characters needed characters left characters exceeded
Giulia Sogaro Nov 15, 2017 at 02:17 PM
0

Hi Adem,

do you set "only values with posted data" for the dimension "VERSION_DIM" in the Initial View?

regards,


Giulia

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Giulia,

When I do that , Version checkbox group looks like above. I want to see it like below.

version.png (67.8 kB)
0