Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

accessing text field by set analysis

hi all

I am trying to access a field which contains text by following expression for specific dimension but unable to get the text instead it is showing 0

sum( {$<END_DT={'4/30/2009'}>}(CD_UNIT))

CD_UNIT  field contains texts like kwh or kvh or kw etc.

Any solutions to it ?

2 Replies
Anonymous
Not applicable
Author

You do not want to use a sum() aggregation against a text field. Instead use Only(), minstring(), maxstring(), or something similar.  If you need to display more than one value, look into concat().
-Phil

erichshiino
Partner - Master
Partner - Master

I agree with Phil but if you meant that in the field there are numbers with the unit in a string format, you will need to adjust it to make it a number.

For example

CD_UNIT = '500 W', '500 kW'

You would need to convert it to the same unit in script:

VALUE  = 500, 500000  / UNIT = 'W'

Then, you would be able to sum it with your expression

Hope this helps,

Erich