on 11-03-2016 11:55 AM
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
Thanks Poovarsan ! For your complete answer helpfull !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.