Skip to Content
0

Clear All Filter Script doesnot work as expected - DS1.6

Nov 03, 2016 at 11:55 AM

178

avatar image
D D

Hi Expert,

I have implemented the following script on a button in order to clear all filter apply on the datasource on design studio 1.6 " DS_1.clearAllFilters(); "

The issue is that it change also the datasource initial view. I add selected only one key figures from the 3 availables. But when I execute the script it clear all the filters and display the 3 key figures instead of the one selected.

Would you know how to solve it ?

Thanks for your help.

Elie

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Poovarasan Boopalan Nov 03, 2016 at 07:21 PM
0

Hi David,

In design studio the key figures structure is also considered as a dimension and removing a measure is carried out as applying filter on it,

So clearAllFilters() command will also clear the filter in a key figure structure.

To avoid that use the setDataselection in charts to show the required keyfigure and use clearAllFilters() to remove filter without affecting data selection.

Or

You can use this code to clear filter on dimensions other than keyfigure structure.

var Dim=DS_1.getDimensions();

Dim.forEach(function(element, index) {

if(element.isMeasuresDimension ==false)

{

DS_1.clearFilter(element);

}

});

Thanks,

Poovarsan

Share
10 |10000 characters needed characters left characters exceeded
D D Nov 04, 2016 at 11:26 AM
0

Thanks Poovarsan ! For your complete answer helpfull !

Share
10 |10000 characters needed characters left characters exceeded