Skip to Content

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

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.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 03, 2016 at 07:21 PM

    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.


    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)







    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2016 at 11:26 AM

    Thanks Poovarsan ! For your complete answer helpfull !

    Add comment
    10|10000 characters needed characters exceeded