It is possible to add one or multiple filters in Helical Insight. By default all the filters gets added in AND expression i.e. Filter1 AND Filter2 AND Filter3 which means it shows an overlap of data wherein all the filtering conditions value gets satisfied.
But in some cases we may want to change and use OR or some custom filter expression between the various filters which have been added. In this blog we have covered how to achieved the same in Helical Insight version 5.0 onwards.
- To set any custom filter expression:By using this we can use any custom filter expressions in helical report.To use this scripts, we need to add filters and select some parameters/values in filters for the report.
Suppose that we have created a report with 2 filters i.e. source and destination as filter labels (these filter could be any type of filter like single select, multi select etc).
- To use AND filter condition through script:You would need to go to the Operations and in the Pre Fetchplaceholder. Over there you can put the below kind of expression wherein we are setting the filter expression and mentioning the filterlabels (in this case source and destination are the filter labels to the filters which have been added).
setFilterExpression((“source AND destination”))
Here table report is generated with two columns destination and source. Same column destination and source is added as filter.We used here AND filter condition in script to satisfy the both conditions in the report.
- To use OR filter condition through script:Similarly to the above response if you would like to use OR filter expression between various filters then something like below can be put on the Pre Fetch placeholder.
setFilterExpression((“source OR destination”))
In a similar way we can have multiple more complex expressions also like
- To use AND filter condition through script:You would need to go to the Operations and in the Pre Fetchplaceholder. Over there you can put the below kind of expression wherein we are setting the filter expression and mentioning the filterlabels (in this case source and destination are the filter labels to the filters which have been added).
NOTE: You can always click on SQL and see the SQL to verify if the expressions which you are putting is generating correct response or not.