Most of the financial KPI reporting in BI applications needs the data to be reported period wise. The common scenario is to display the KPIs for different periods based on the User Input.
The KPIs to be reporting could be:
The Conceptual HANA Information can be shown like below:
Some of the assumptions for the below model are as follows:
The sample data considered for this example is as follows:
There are multiple ways in which the above KPIs can be implemented. In this blog, I would like to discuss the implementation using Calculated Columns in HANA and touch upon the Pros and Cons of the approach.
The main reason for the different approaches for the Projection is due to the fact that Projection expression does not provide flexibility for the data manipulation. The filter expression provides limited functions to be operated on the input parameters and hence filters cannot be set for derived values of the Input parameters, like Start of the Month or Start of the Year date, based on the Input date.
The Projections can be defined with Constant columns to effectively use Pruning of queries.
Approach with Calculated columns:
The projection filters need to be defined with the following restrictions using Calculated Columns.
The calculated columns for the Projections can be defined as mentioned below.
The UNION node can be implemented with the constant columns as shown below:
With the above Projection model, the result of the query execution for a given date range, specified by the DATE_FROM and DATE_TO Input Parameters in the above model, is shown below.
Pros of the model:
Cons of the model:
As you can see from the below execution plan for WTD KPI, there is No Filtering (No BWPopSearch operation) of the data happening at the Analytic Engine and all the records (11 rows) are passed to the Calc Engine.
Due to the drawback of Filter not getting pushed down, the impact on the performance is quite adverse. Hence this model is not recommended. But depending upon the data volume, required complexity in the development and maintenance, such data model can still be considered for the Period KPI reporting.
I will post another blog in next couple of day on second approach using SQL Script to implement the same requirement.
Please feel free to comment on this blog. Any recommendations / suggestions (even "Dislike" comments) are most welcome. :smile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |