cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling selection for totoals in crosstab

Former Member
0 Kudos

Hello,

I have some crosstab which data I use as a filter for other report components.

categorytotal spend
a1
b2
c3
total6

I am using following syntax to use category data as a filter:

DS_1.setFilter("category", CROSSTAB.getSelectedMember("category").internalKey);

I am wondering how to create the syntax to filter other report components by "total" from the crosstab (Enabling selection for totoals in crosstab)

As a workaround I am using button which clear the filters but it is not the same what customer required.

Any advice please ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Arjun_KT
Participant
0 Kudos

Hello Marcin,

When clicking total if you want to filter with all values of Category then you should pass blank value   .

Please try following script.

DS_1.setFilter("category","");


Regards

Arjun KT

Former Member
0 Kudos

Hello Arjun,

Thanks for the tip.

But my intention is to filter tha data in the other chart by clicking each of value from category column (a, b, c and total as well) in this crosstab.

Thanks

Arjun_KT
Participant
0 Kudos

Hello Marcin,

If i understood correctly when you select total then you want to filter the DS1 data source with total.

Ie when clicking on total then all values should show in other data source??

if so then can you try following script

var v1= CROSSTAB_1.getSelectedMember("category").text;

if (v1== "total") {

DS_1.setFilter("category", "");

}

else {

DS_1.setFilter("category",v1);

}

Regards

Arjun KT

Former Member
0 Kudos

Hello Arjun,

your proposal is fine but the worst thing is that selection is not working when I am clicking on "total". For values "a", "b" and "c" is fine but for "total" it doesn't work.

Btw in propertis for crosstab option "Enable Selection" is true.

Total was created by choosing following display under Edit Initial View for Data Source.

Thanks.

Arjun_KT
Participant
0 Kudos

Hello Marcin,

Am not sure whether you can make selection in the Total which is part of the cross tab.

So as a work around you can keep a button( with the name Total) in the place of total in the cross tab.

When user selects the Total button then you can filter DS1 data using blank.


DS_1.setFilter("category","");

The cross tab look and feel can be align properly with css i think . Just give a try if it works or not.

Best Regards

Arjun KT

Former Member
0 Kudos

Hello Arjun,

I already use the button as a workaround, but nevertheless such a functionality will be helpful in future.

Do you know where I can report this to be taken into account in next releases.

Btw thanks for you help,

BR,

Marcin

TammyPowlas
Active Contributor
0 Kudos

Hello Marcin,

Only idea I can think of (and I haven't tried it myself) is the response from SAP's Jie Deng here

Could you check out her code/script and see if it may apply in your situation?

Former Member
0 Kudos

Hello Tammy,

As I have checked it is something different.

What I would require is to click on "total" in crosstab and programing that selection to filter the data in other crosstab or chart.

Thanks.