Rule

Post Reply
st2000
Posts: 56
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Rule

Post by st2000 » Tue Sep 05, 2017 11:59 am

Hope somebody could throw a light on my misunderstanding:

I try to implement a spreading procedure and first of all I want to have an indicator for changes at all (by rule).
I attached a picture showing the cube, the attributes cube assigned to the main cube and the rule:

Code: Select all

['Changed',{'A','B'},'Expenses'] = IF (DB('Value',ATTRS('Status', !Status, 'Deltaelement'),'Expenses') = 0 , 1, 2);
The attribute is correctly resolved as 'A_Delta' resp. 'B_Delta', and I can save the rule and refresh the cube viewer without errors.
But the cell Valuetype=Value,Status=A_Delta,acc2=Expenses contains '200', which is != 0, so I'd expect the rule to get a result of '2' here, where ValueType=Changed, which should be the indicator to process the A_Delta afterwards.
DB_ATTRS_RULE.png
DB_ATTRS_RULE.png (59.91 KiB) Viewed 185 times
I fear it is a very 'dummy' question, but I didn't find something similar in the historic posts...
(The xy_Delta-cells are intended to take input in a websheet, later these inputs should be spreaded via TI instead of immediately via contextmenu spreading methods.)
DB_ATTRS_RULE_Cubemodel.png
DB_ATTRS_RULE_Cubemodel.png (10.23 KiB) Viewed 185 times

Misunderstanding of the correct FEEDER, maybe?
-----------------------------------
Best regards,
Stefan

User avatar
tomok
MVP
Posts: 2335
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Rule

Post by tomok » Tue Sep 05, 2017 12:23 pm

st2000 wrote:
Tue Sep 05, 2017 11:59 am

Code: Select all

['Changed',{'A','B'},'Expenses'] = IF (DB('Value',ATTRS('Status', !Status, 'Deltaelement'),'Expenses') = 0 , 1, 2);
Check your syntax on this rule. The proper syntax when using DB to reference a cube is:

DB('Name of Cube', Dim1, Dim2, Dim3....Dimx)

st2000
Posts: 56
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Rule

Post by st2000 » Wed Sep 06, 2017 8:00 am

Aaarghh, indeed it WAS a dummy question, just oversaw the missing cubename in DB-formula while thinking around potential errors in ATTRS.
Sorry for polluting the forum and thanks for the hint... :oops:
-----------------------------------
Best regards,
Stefan

lotsaram
MVP
Posts: 2998
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TM1, CX
Version: TM1 10.2.2 PA 2.0x
Excel Version: 2010 2013 365
Location: Switzerland

Re: Rule

Post by lotsaram » Wed Sep 06, 2017 9:38 am

tomok wrote: Check your syntax on this rule. The proper syntax when using DB to reference a cube is:

DB('Name of Cube', Dim1, Dim2, Dim3....Dimx)
Yes. Although it would be a pretty decent enhancement if you could use a blank string as the first argument in a DB() to mean "Me. The cube that I'm in" the same way that it works for the ConsolidatedAvg/Min/Max/Count functions.
It would make generic rules that much more portable.

I'm not holding my breath.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.

Post Reply