Creating a Cell Calculation

  • 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 %";

  • 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

  • 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.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply