In this article, you will learn about how to apply Filter Expression using Helical Insight.

Filter expression is a query expression written in order to fulfill certain condition which cannot be directly fulfilled by applying a general filter.

There are two types of filter expression which can be used, one in which functions are present and the other without functions (refer below image):

  • Filter Expression
    Any column which is not having any aggregate functions or group by function applied to it, if it is added as a filter will come under “Filter Expression“. This means if we are directly dragging any column from left selection and using it as filter it will fall under this category.
  • Having Expression
    We can drag any column from any table into selection panel and then add function (like average, groupby, sum, etc). Now this can also be used as filter with these functions applied. These then appear under “Having Expression”.

Also, the way of writing a Filter Expression or Having Expressions are same.

Whenever a user insert a filter then each filter is given a number starting with 0. First filter is assigned $(0), second $(1) so on and so forth in the Filter Expression. By default these are separated by AND operator, which can be changed (will be elaborated in the latter part of this article).

Important :

Whenever we add any filter we generally pass three things. First is column name on which filter is applied, second is condition and the third is value. For example, if we want to filter all the travel which happened in domestic route, RouteType is column, EQUALS is condition and DOMESTIC is value.

  1. When only “${0}“ is used in the filter expression / having expression, it signifies that all the parameters like column, condition and value are considered.
  2. ${0}.column -> It signifies that only column parameter for the first filter is considered.
  3. ${0}.condition -> It signifies that only condition parameter for the first filter is considered.
  4. ${0}.values -> It signifies that only values parameter for the first filter is considered.

For Example :

A DateTime datatype column is applied as a filter where a year needs to be extracted from that column irrespective of the value selected. The problem in this case is since the datatype is different and we need to extract only the year and filter accordingly, in such cases Filter expression would be useful.

Suppose selected value is “2016-06-01 17:51:56” in the format “YYYY-MM-DD hh:mm:ss”

Filter expression :

Year(${0}.column) = Year(${0}.value)

2016  = 2016  //If condition fulfills then output is generated,  otherwise “No data” message is displayed.

Year(${0}.column) : Year is extracted from the selected columns which is used as a filter
Year(‘${0}.value’) : Year is extracted from the filter value inserted by the user

 

You can also use SQL query and compare the output to the filter values.

From version 4.0 GA onwards, we have implemented security upgrade which restricts use of certain SQL keywords and patterns in the filter expression and having clause. You can change the SQL pattern and add or remove the patterns that need to be restricted in the defaults.properties file present in ../hi/hi-repository/System/Admin folder. For more details on the security rules and usage, please refer to this blog.

Use Case :

An area spline chart showing Month-Year wise travel expense report for the year 2015.

If you want your data to be filter out based on the “Year” and “Month Range” then what to do ?

A filter expression is required by converting a filter column into appropriate format for comparison.

Follow the steps :

    1. Insert the column twice and set values to “Auto”. By clicking edit you can set value.

    1. Rename the filters for your understanding and apply proper condition

    1. Apply a filter expression
    year(${0}.column)=year(${0}.value)    // year is extracted for comparison
    AND
    month(${1}.column) >=month(${1}.value)    // month is extracted for comparison
    AND
    month(${2}.column)<month(${2}.value)    // month is extracted for comparison 

 

  1. Click generate to view output

For more details, mail us at demo@helicalinsight.com

Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered