Forum Discussion
MDX Query
In MDX (I assume you're using SSAS Multidimensional) using the SUM function with a measure in the way you're doing here doesn't actually have any effect - the default aggregation behaviour of the measure will be used. So using the following MDX in a measure:
([Measures].[Wait Time In Sec]/[Measures].[Total])/60
should give you the same incorrect result. What's more, MDX automatically ignores null values while aggregating anyway. Can you provide more details - with sample data - of what you want to do here?
More complex aggregation behaviour is possible using SCOPE statements. The following blog post might help:
Chris
hi cpwebb ,
yes i'm using SSAS multidimentional table here i tried to create new calculated measure like below
MDX (sum of wait time in minutes) : sum([Measures].[Wait Time In Sec])
here is my table:
| Wait Time In Sec | Total |
| 58896 | 5568 |
| 56689 | 4869 |
| NULL | 9562 |
| 96347 | 7856 |
| 77546 | 4489 |
| NULL | 8965 |
| 89647 | 7854 |
Expected total of waitTimeInSec = 379125
i'm not sure may be due to NULL values result is coming : -266545 ( as negative)
kindly suggest how to create measure with replacing NULL values as 0 and sum of total.
Thanks,
MS
- cpwebb2 years agoMicrosoft Employee
Is waitTimeInSec itself a calculated measure? If so, what is the definition? I don't think the nulls are the problem here.
Chris
- MSuser52 years agoHelper III
Hi cpwebb ,
i have created measure in SSAS Cube level referring fact table column (which is waitTimeInSec)
so the measure result while SUM appear wrongly as negative total. Is this because of NULL on that column?
MS
- cpwebb2 years agoMicrosoft Employee
Like I said, I don't think the nulls are the problem. You will need to provide a lot more detail on your cube design (please post screenshots of all relevant properties etc) in order to troubleshoot this.