Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Combining multiple rows

Received Response
108
Views
9
Comments
Rank 4 - Community Specialist

I would like to combine the values from multiple rows into one column.

Instead of getting

NameAddress
JohnAddress1
Address2
Address3

I would prefer to have

John     addresss1, address2, address3

Note I do not have administrator privileges so this would have to be done within a custom column formula, I imagine.

Build is 11.1.1.9.5.

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Rank 8 - Analytics Strategist

    Hi @Wolfrm

    If you have access to call Oracle Analytic functions via EVALUATE, you could try using LISTAGG

  • Rank 4 - Community Specialist

    Thanks, Joel. I tried using listagg but couldn't for the life of me figure out how to correctly call that function. I do have access to evaluate and evaluate_aggr.

  • Rank 8 - Analytics Strategist

    Something like this should do the trick:

    EVALUATE_AGGR('LISTAGG(%1,%2) WITHIN GROUP (ORDER BY %3 DESC)',OBIEETableName.OBIEEColumnName,';',OBIEETableName.OBIEEColumnName)

  • Rank 4 - Community Specialist

    I tried using that but it did not work and on closer inspection, it seems I don't actually have access: Message returned from OBIS. EVALUATE_SUPPORT_LEVEL inside NQSConfig.INI is not set to support EVALUATE.

    I had incorrectly assumed I had access to EVALUATE because the function was available in the list of functions in the custom column screen.

    Is there any other way to accomplish this, without using LISTAGG?

  • Rank 2 - Community Beginner

    Not really because OBI relies on the data source to interpret these windowing functions!

  • Rank 4 - Community Specialist

    That is unfortunate. An alternative solution would then be to find a way to use line breaks in tables, since I could then massage the table layout to produce what I need without using LISTAGG to combine rows. But for this I would need line breaks in the table view. Any ideas? Note that I asked this in my other thread and accepted narrative view as answer to using line breaks, but that was before I run into this next issue, in this thread.

  • Rank 2 - Community Beginner

    Even if it means writing an opaque view...how about using one of those to call the LISTAGG or directly do the view in the DB?

  • Rank 4 - Community Specialist

    Thanks, Christian. My access is really limited - I cannot create opaque views nor do I have direct access to the database.

  • Rank 2 - Community Beginner

    Okeeeey so then you're basically in a situation where you can't achieve this with normal config.

Welcome!

It looks like you're new here. Sign in or register to get started.