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

Showing exactly one of multiple possible values in table object

Hi,

in a table object I want to show exactly one of multiple possible values.

The dimension is KN_ID.

One KN_ID can have multiple OB_ID and therefore multiple values for OB_Type. In the Table I want to show OB_Type as a measure but I do not want to do any aggregation. I just want the column OB_Type to show one of the possible values for OB_Type for KN_ID.

So far I tried achieving that by using concat and other string functions, but I could not find a satisfying solution.

Could somebody help me with that?

Example is attached

Best regards and thanks in advance

thorben

13 Replies
Not applicable
Author

maxstring.PNG

For some reason subfield(MaxString(rand()&'|'&OB_Type),'|',2) is empty sometimes. OB_Type does contain empty strings. Maybe it has to do with the rand()-function or with the null-values contained by OB_Type...

karthiksrqv
Partner - Creator II
Partner - Creator II

Ah..ok, then something like this

subfield(MaxString(len(OB_Type)&'|'&rand()&'|'&OB_Type),'|',3)

to ensure that strings with non-null values come up on top.

Not applicable
Author

thank you very much

What an overhead to do such a simple thing

karthiksrqv
Partner - Creator II
Partner - Creator II

Your welcome!

That's true!