![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to create a measure that will return either an error message or when aggregated, show the number of errors. I first created an Error Count measure that does a simple sum of the errors. Then I created a calculated measure that basically consits of an iif that returns the count if the count is > 1 or "some text" if the count is 1. The problem I'm having is how to actually refer to the error text ("some text" is currently a placeholder) in that statement. The source column for the Error Count measure is an errorTypeId column which links to an ErrorType table that contains the description that I want to show. I was thinking of somehow creating a dimension off of the ErrorType table and then getting the appropriate member back by using the ErrorTypeId that is being used for the Error Count measure. But I haven't been able to get anything to work so far. Does anyone have any ideas? David |
#3
| |||
| |||
|
|
I sounds like you may want to reconsider the design of your data structures. If what you are measuring is the occurance of a error, then this is the fact, or transaction information. It sounds liek you record the type of error that occured and have attribute data for that error type (ie description/text). You may want to consider have a fact table which records the occurance of an error, supplemented by an error dimension which contains the text of the error. rather than trying to create a text measure - measures ought to be numeric and additive (such as count). "David Hwang" wrote: I'm trying to create a measure that will return either an error message or when aggregated, show the number of errors. I first created an Error Count measure that does a simple sum of the errors. Then I created a calculated measure that basically consits of an iif that returns the count if the count is > 1 or "some text" if the count is 1. The problem I'm having is how to actually refer to the error text ("some text" is currently a placeholder) in that statement. The source column for the Error Count measure is an errorTypeId column which links to an ErrorType table that contains the description that I want to show. I was thinking of somehow creating a dimension off of the ErrorType table and then getting the appropriate member back by using the ErrorTypeId that is being used for the Error Count measure. But I haven't been able to get anything to work so far. Does anyone have any ideas? David |
![]() |
| Thread Tools | |
| Display Modes | |
| |