Sunday, September 15, 2019

How to strike a balance between filter and deck for Cognos Analytics Active Report


This article is intended to demonstrate a solution with a practical sample, in which we found that the balance approach between the filter and deck is the best to develop Active Report for Cognos analytics with data visualizations. The appropriate use of visualization will dramatically reduce the size of mht file, and also reduce the report generation time.

Requirement:
Multiple matrices with two major dimensions, Country and Level 1 (it can be considered it as product)


The real main challenge is that both Countries and Products are multiple select. In other words, users can select any one or more countries, or any one or more products, or any combinations as user wanted.

First of all, there is no way that we can use deck to resolve this issue, as the combination is very like (number of countries)! X (number of products)! , which is unlimited combinations. However, we cannot simply pass selected countries, or products, along with all countries and all products.


Analysis
Pure deck approach
Data control flows via static deck and data desk. All contents under deck can apply master detail relationship. Content under deck can have animation effect, such as the whole content appears from left to right. The advantage is that data content is clearly defined and shown with each combination, along with animation effect. In addition, Query with complicated filter logic can be filtered by master detail relationship between column from deck and PARAMETERS from query.
The Disadvantage is that if the combination is too big, the size becomes unmanageable and the report generation time becomes too long.
Pure filter approach
Both visualizations and data list and cross tab can be filtered on the fly without pre-generation of data.  All the filter action happened on the client side. The Advantage is that filters will yield very high download speed, as the size is much smaller than deck. At the same time, it will dramatically improve the generation speed, as report is not requested to generate all combinations. However, the disadvantage is that No master –detail relationship can be created. However, you can only filter it based on individual data column, parameters can’t be used.
Balanced approach
We use the major cases as deck, such as different matrices. We can also turn complicated logic into different decks to resolve.  We should try to use the filter as much as possible.


Solution
The solution is to turn this unlimited combinations into 4 Decks and unlimited filters


1. Introduce two variables
        a. avCountryGrp:
                i. AllCountries
                ii. SelectedCountries
        b. avLevel1Grp:
                i. AllLevel1s
                ii. SelectedLevel1s
When user click All Countries, then avCountryGrp = AllCountries
When user select one or more countries, then avCountryGrp = SelectedCountries
When user click All Level1s, then avLevel1Grp = AllLevel1s
When user select one or more Level1, then avLevel1Grp = SelectedLevel1s



2. Make 4 Decks as below




3. If the list is too long, then we can control size by applying conditional block.


4. In case when Multi-lingual needed, it is a better approach to copy the English version to another and then directly change all labels, buttons and tooltips. It is difficult to use language variable, as the changes are much more complicated than normal report. Duplicate the final query and change its labels to Spanish could be much easier to drive both chart and list.

No comments:

Post a Comment