Use of ATTRS function in a rule
Posted: Wed Oct 16, 2013 9:56 am
I am trying to use the ATTRS function in a rule with an IF statement to perform a calculation when the Service Accounting Field is not 'Y', however I am getting an error when trying to save the rule. The rule I have created is in an EAC cube and should not calculate Total Sales before Adjustments on Service Accounting Orgs. For all other Orgs, it should calculate. There are only nine Service Accounting Orgs I need to have the calculation ignore and enter a value of zero (0). Thus I thought it would be easiest to create a rule using the ATTRS function:
Total Sales Before Adjustment = N:If(ATTRS('Org', !Org, 'Service Accounting')@='Y',0,['Subtotal Costs']/1-['Booking Rate','Current Month']));
The rule saved, but does not calculate any values. If I remove the If(ATTRS('Org', !Org, 'Service Accounting')@= 'Y',0, section of the code, it works fine. I think my issue is around the !Org section of the code, as I wanted it to look at all elements in the Org dimension. Any help would be much appreciated.
I am working on Cognos 10.1.1 64 Bit with Microsoft Excel 2007
Total Sales Before Adjustment = N:If(ATTRS('Org', !Org, 'Service Accounting')@='Y',0,['Subtotal Costs']/1-['Booking Rate','Current Month']));
The rule saved, but does not calculate any values. If I remove the If(ATTRS('Org', !Org, 'Service Accounting')@= 'Y',0, section of the code, it works fine. I think my issue is around the !Org section of the code, as I wanted it to look at all elements in the Org dimension. Any help would be much appreciated.
I am working on Cognos 10.1.1 64 Bit with Microsoft Excel 2007