J C
asked on
Crystal Reports 11.5 Trying to average an nvarchar field
Is there a way to convert the values in the nvarchar field to a numeric value so that I can average it?
I've got a nvarchar field which was named totalincome. The values are strictly numerical and I need to generate the average total income. Any help would be greatly appreciated!
I've got a nvarchar field which was named totalincome. The values are strictly numerical and I need to generate the average total income. Any help would be greatly appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
WHa do you want the average to represent?
If you had 2 25-35 and 1 35-45 what would the average be and what would it really mean?
One way would be to average
25, 25, 35 to get 85/3 = 28.3
35, 35, 45 to get 115/3 = 38.3
so the average would be 28.3 - 38.3
Not sure how meaningful that really is.
mlmcc
If you had 2 25-35 and 1 35-45 what would the average be and what would it really mean?
One way would be to average
25, 25, 35 to get 85/3 = 28.3
35, 35, 45 to get 115/3 = 38.3
so the average would be 28.3 - 38.3
Not sure how meaningful that really is.
mlmcc
ASKER
You're right, it doesn't make sense. They are asking for the average age of the person and I think what I was looking to do was to be able to show the average age range since I don't have any other data I can use in the report to represent a real Age.
ASKER
I have another field I want to average. It is the BuyerAge field...The values look like this "(c) 25-35"
It's an age range. Is there any way that you can think of that I could average that somehow?
Thank you for your response.