Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Creating a Cell Calculation Expand / Collapse
Author
Message
Posted Friday, March 15, 2013 12:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 06, 2013 1:28 PM
Points: 3, Visits: 35
Hi Everyone,

I hope someone out there has experience with this. I am trying to use a cell calculation in my cube that formats a value based on the account it is using (Percent or Currency). The following cell calculation I wrote as a script in my calculation. However when I reprocess the cube the value just disappears. Am I missing something? Thank you for your help.

Bobby

CREATE CELL CALCULATION [Property].[TestFormat]
FOR '([Income_Statement].[Account List].&[464], [Budget Variance])'
AS [Measures].CurrentMember
,FORMAT_STRING = "#,##0.00 %;-#,##0.00 %";
Post #1431678
Posted Thursday, March 21, 2013 3:22 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, January 13, 2014 7:34 AM
Points: 117, Visits: 499
Hi Bobby,

What version of SSAS are you using? Haven't used cell calcs in yearrrrrrrrrsssssssssss

If you are using 2005+ then you could try

SCOPE([Income_Statement].[Account List].&[464]);   --not sure I included everything you wanted

FORMAT_STRING(This) = "#,##0.00 %;-#,##0.00 %";

END SCOPE;

Mack
Post #1433656
Posted Tuesday, March 26, 2013 8:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 06, 2013 1:28 PM
Points: 3, Visits: 35
Thanks for your replay Mack.

I am using 2012. I added the code that you posted and it doesn't appear to work. I admit I'm new to this... However when I plug the scope statement into my calculation script it throws an error on the "SCOPE". The error is that stupid syntax for ';' is incorrect. Is there something that needs to go in front of this in order to apply it in this scenario? From everything I've read the scope statement starts there...so I am confused as to what I could be missing. This is what I am seeing.



  Post Attachments 
CodeView.jpg (3 views, 123.84 KB)
Post #1435543
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse