Wednesday, November 1, 2017

How to use tuple without measure member in Crosstab with Cognos DMR model

A tuple is a combination of members from different dimensions. Normally, each tuple is a data cell in a result set, therefore a measure must be located in a tuple. However, a tuple may not be needed in Cognos DMR. This capability will present a very powerful solution for many cross table developments, as long as there is a measure in either column or row, regardless of whether it is nested or not. Furthermore,  we don’t even need a measure in either row or column if there is only one default measure used.

The following sample is intended to give an idea how this concept can be applied in development. 
The Cognos sample package great_outdoors_warehouse is used in this sample; the crosstab is to figure out the difference between planned revenue and revenue and between Telephone and Fax. Two not normal usages are used:
1) No measure is used in both tuples
 a.tuple([Telephone],[Camping Equipment])
 b.tuple([Fax],[Camping Equipment])
2) No measure is used in calcualtion for two tuples
[Telephone, Camping Equipment] - [Fax, Camping Equipment], which is same as
tuple([Telephone],[Camping Equipment]) - tuple([Fax],[Camping Equipment])


Add one more practical sample below for reference:

1. if ([UPLC] is null) then (0) else ([UPLC])
+ if ([UPL]  is null) then (0) else ([UPL])
+ if ([CIBC PCA Overdraft] is null) then (0) else ([CIBC PCA Overdraft])
+ if ([PCF Unsecured PLC (LCBA)] is null) then (0) else ([PCF Unsecured PLC (LCBA)])
+ if ([PCF Unsecured PL (APL & RRSP)] is null) then (0) else ([PCF Unsecured PL (APL & RRSP)])
+ if ([PCF Approved Overdraft] is null) then (0) else ([PCF Approved Overdraft])
+ if ([PCF Operation Overdraft] is null) then (0) else ([PCF Operation Overdraft])
2. (tuple([NCL], [0-FYTD]) / tuple( [O/S Balance], [0])) * 10000
3. (tuple([NCL], [1-FYTD]) / tuple( [O/S Balance], [12])) * 10000
4.[Consolidated Cube].[Actual Or LE].[Actual Or LE].[Actual Or LE]->[all].[Actual]
5.[Consolidated Cube].[Actual Or LE].[Actual Or LE].[Actual Or LE]->[all].[Forecast]
6.([Forecast] - [Actual]) / [Forecast]

No comments:

Post a Comment