cancel
Showing results for 
Search instead for 
Did you mean: 

Crosstab "Filter and Drill Down by" on value select

moritz_kelm
Participant
0 Kudos

Hi.

I would like to achieve a "Filter and Drill Down by [free characteristic from the query]" using the Design Studio crosstab component.

Ideally, this would happen on selection (tap) of the table row.

I'm on Design Studio 1.5.

Example: Initially, all divisions are displayed. I tap a division and the crosstab is drilled down to the materials in this division, which are being shown instead of the division in the first column.

I could also use a hierarchy. However, I want to exclusively jump to the next level, hiding the other values.

The crosstab itself doesn't need much more features than this drill-down, as this functionality is intended for a slim mobile app.

The "navigate back" function should be realizable through a separate button.

(How) is this possible? Can I access the selected values in the crosstab's "On Select" event? I dont see the "Data Selection"-functionality for the crosstab.

Maybe it needs to be done on data source level?

Any ideas appreciated Thanks!

Best,

Moritz

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Moritz,

The blog post Enable "Drill" navigation behaviour like in WebI should address your requirement.

Regards,

Mustafa.

moritz_kelm
Participant
0 Kudos

Thanks Mustafa. I used the code mentioned in the blog to realize the required feature. See the code examples below in my answer to Tanush.

Answers (1)

Answers (1)

0 Kudos

Hi Moritz,


YES u can achieve this functionality . First in your Crosstab properties set Selection Type to Single  and Selectable Area to Rows. Now suppose your CROSSTAB is like below.



DivisionMaterialNet Sales
D1A100
D1B200
D1C300
D2E400
D2F500
D3G600
D3H700


    ON THE ONSELECT of your Crosstab.just write the below code.

DS.removeDimension("Division");

DS.setFilter("Division", CROSSTAB.getSelectedMember("Division"));


Now if u had selected D1 from your Crosstab. You would get the below result in your Crosstab.


MaterialNet Sales
A100
B200
C300


For back functionality add a BUTTON and write the appropriate code.

Note : Multiple select will not work for Non desktop application.


Thanks,

Tanush


moritz_kelm
Participant
0 Kudos

Tanush,

Thanks! Your proposal was missing the "swapping" of the dimensions. However, I managed to get it right:

I set the Crosstab to Selection Type: Single, Selectable Area: Rows and added the following code "on Select":

DS1.setFilter("Division", CROSSTAB_1.getSelectedMember("Division"));
DS1.moveDimensionToRows("Material"); // If more dimensions should be managed, DS1.moveDimensionBefore() can be used for correct ordering
DS1.removeDimension("Division");

The "Go back" button has the following code:

DS1.clearFilter("Division");
DS1.moveDimensionToRows("Division");
DS1.removeDimension("Material");

It performs quite well. Thanks again!