### Rule or Process?

Posted:

**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

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