Display negative aggregates as zero

  • I'm quite new to SSAS, so please go easy on me.

    I have a measure which, when aggregated, can be positive or negative.

    If, after aggregation, the result is negative, I want to return zero rather than the negative value.

    What is the best way to do this?

    I'm using SSAS in multidimensional mode.


  • Hi Phil,

    The best way is with a calculated measure, using a case statement to check if the sum (or aggregate) is less than zero.

    It would also be possible to do this with scope statement, but that could be a bit more complex.

  • Martin Schoombee (6/7/2016)


    Hi Phil,

    The best way is with a calculated measure, using a case statement to check if the sum (or aggregate) is less than zero.

    It would also be possible to do this with scope statement, but that could be a bit more complex.

    Thanks for the response, Martin. I'll give that a go. I was just reading about SCOPE and it does look a tad complex for a beginner.


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

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