Can I remove a predefined filter in Sisense
Am I able to remove a predefined filter within Sisense that would disallow my viewers from choosing this option? I am using a date filter and the options in the date filter are Last, This, and Next. I want to be able to remove the Last but keep the This and Next filters as options for my viewers.
Rafael Ferreira
Posted 2 years ago·Last reply 2 years ago
7 comments
RAPID BI Support
·2 years agoHi Astroraf ,
HaPIPCLdFZZA6Wn8q1VU looks like the class for the divs that contain these controls.
Try this one out and let me know how you go?
Daniel
RAPID BI
daniel.ranisavljevic@rapidbi.com.au
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons
Rafael Ferreira
OP2 years agorapidbisupport Thank you so much for the answer. Can you explain what the code is doing for some of us who aren't as tech-savvy with CSS?
RAPID BI Support
·2 years ago · EditedSure thing Astroraf ,
Please see comments below:
you can see these elements in the inspection panel in your browser:
This will give you an idea of the classes, ids, elements you can play with.
The other approach here is to use jQuery to manipulate the elements - but there are drawbacks here like that the element needs to exist when the jQuery runs.
You can try this in your console by doing this:
$('..gsoNqAmwurDnBIjywenH:nth-child(1)').hide()
If you run this in your browser console with the Last / This / Next selection open it will hide the Last option.
Hope this helps?
Thanks,
Daniel
RAPID BI
daniel.ranisavljevic@rapidbi.com.au
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons
Rafael Ferreira
OP2 years agoSo now I would like to remove these three filters. Utilizing your code would my code snippet be:
or since this element is of a div class then how would I change the code to reflect this?
RAPID BI Support
·2 years ago · EditedHi Astroraf ,
Can you try the following?
This removes the 'Last' item by hiding the associated container in CSS.
It works on my side L2024.1 - but would be mindful to check if any changes to the class name in future (should include in any future version upgrade regression testing in case you need to change the reference).
Result:
Thanks,
Daniel
RAPID BI
daniel.ranisavljevic@rapidbi.com.au
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons
Rafael Ferreira
OP2 years agorapidbisupport the reason I ask, is that my client is asking about how to remove the bottom three filter options to present to their clients.
Hamza Jap-Tjong
·2 years agoHey Astroraf ,
I dont think this is possible. However you could use Blox to create buttons that do exactly this. You can then lock that filter so users cannot change it, except for with the predefined filters in the Blox buttons. --> https://community.sisense.com/t5/knowledge/blox-filter-buttons-for-trailing-x-months/ta-p/8649
Here is a link to a post explaining this. If you are looking for a easier way then I can recommend Ravid_PaldiTeam 's date range filter https://www.paldi.solutions/plugins/date-range-filter
Hamza