Rule or Process?

Post Reply
MarenC
Posts: 20
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Rule or Process?

Post by MarenC » Fri Aug 16, 2019 10:41 am

Hi,

I have a cube with four dimensions,

lets call them

Dim1
Dim2
Dim3
Dim4 - Measure dimension

In dim 4 there is a measure called DaysTaken

I want to be able to create bandings for DaysTaken, so the following bandings:

Band1 = DaysTaken between 1 and 4
Band2 = DaysTaken between 5 and 15
Band3 = DaysTaken between 15 and 30
Band4 = DaysTaken greater or equal to 30

My thought was to create these bandings as a flag measure in Dim4, the measures dimension and
then have a rule for each band, so for example

[Band1] =N: If( [daystaken] >=1 & [daystaken] <=4, 1,0);
[Band2] =N: If( [daystaken] >=5 & [daystaken] <=15, 1,0);

etc

The problem comes when trying to report off this, so say I have another measure in Dim4 called sales, how do I report the total value for sales where Band1 =1 etc?

update: I do have something that kind of works, so instead of separate measures for Band1, Band2 etc, I created a single measure called Bandings which returns either Band1, or Band2 depending on daystaken. I then created 4 measures which capture sales by banding, so for example:

[SalesByBand1] = N: If(['Banding'] @= 'Band1', ['Sales'],0);
[SalesByBand2] = N: If(['Banding'] @= 'band2', ['Sales'],0);
etc

Maren

User avatar
PavoGa
Community Contributor
Posts: 359
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.05
Excel Version: 2013 PAW
Location: Cleveland, Tennessee

Re: Rule or Process?

Post by PavoGa » Fri Aug 16, 2019 12:12 pm

Why not add another dimension for Bandings since that seems to be the way you want to be able to slice the data?
Ty
Cleveland, TN

MarenC
Posts: 20
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: Rule or Process?

Post by MarenC » Fri Aug 16, 2019 1:17 pm

Hi PavoGa,

that did cross my mind but that would require the data getting populated via a data load, so it would be a process not a rule? Because if I added in Bandings as a dimension it would mean I would need to add a particular sale to a particular banding, wouldn't it?

Maren

User avatar
PavoGa
Community Contributor
Posts: 359
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.05
Excel Version: 2013 PAW
Location: Cleveland, Tennessee

Re: Rule or Process?

Post by PavoGa » Fri Aug 16, 2019 1:57 pm

I may have missed it, but how are [daystaken] and [sales] loaded? From another cube via rules?

Either way, seems obvious your measure should be sliced by the Banding. Adding individual measures to achieve this is really defeating the purpose and advantages of dimensional modeling and TM1. What happens if you need a new banding? You'll have to add new measures, modify rules, etc, where if you use a separate dimension, you can achieve what you need by adding a new element and populating whatever attributes or entries in a mapping cube that the rules and/or TI use to facilitate loading the data.

Without knowing your model and requirements, I could not tell you definitely which of rules or TI is better, although if the two measures mentioned above are by TI, then by all means, setup the TI to slice into a bands dimension.
Ty
Cleveland, TN

MarenC
Posts: 20
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: Rule or Process?

Post by MarenC » Fri Aug 16, 2019 2:08 pm

Hi,

The data will be loaded by TI but can be modified by the end user.

The reason I was reluctant to add in another dimension was because if the user wanted to modify the values this new dimension for bandings would add an extra level of granularity for them to deal with.

Maren

User avatar
gtonkin
MVP
Posts: 677
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: PAL 2.0.3
Excel Version: 2016 64-bit
Location: JHB, South Africa
Contact:

Re: Rule or Process?

Post by gtonkin » Fri Aug 16, 2019 8:32 pm

To derive the Band, create a standalone dimension with Bands as C Levels and days as N level.
If you only need to know the Band, I.e. 1 through 4 then just use elpar to get the parent and possibly if not zero and dimix is zero then maximum band.

If you change the components of your C levels, your bands will update automatically.

If you are then trying to do a count on how many customers are in Band 1, Band 2 etc. you would need measures for these and then rule derive a zero or 1 based on the Band.

Post Reply