June 7, 2016 at 8:55 am
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.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
June 7, 2016 at 9:22 am
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.
June 7, 2016 at 9:25 am
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.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply