Skip to main content

Author Tip | Concatenate Data Items in a List Column - Knowledgebase / Business Systems / Cognos Analytics - OIT Service Center

Author Tip | Concatenate Data Items in a List Column

Authors list

Concatenating in Cognos Analytics allows you to combine 2 data items in a list column.

For example, if you have First Name and Last Name data items, you might want them to appear together in a single "Name" column .

There are 2 methods to concatenate data items in a list column. We’ll use the name example above to demonstrate these methods.

  1. Use a query calculation

  2. Unlock page layout and drag multiple data items to a list column

Method 1: Use a Query Calculation

Use the screenshot to follow the steps below.

  1. From the Toolbox drag a Query Calculation to your list. 

  2. In the Name field, give your data item a name.
    Since we are creating a concatenation of first and last name, we’ll call it 'Name' for this example. 

  3. Into the Expression Definition field:

    1. Drag First Name.

    2. Type + ‘ ‘ + 
      That's: plus, single quote, space, single quote, plus. The plus sign combines data items, and the single quotes before and after a single space adds a space between first and last name values.
      TIP: Don’t copy and paste from this document. Characters from other applications don't always copy in the same format Cognos Analytics expects.

    3. Drag Last Name.

  4. Validate your expression, and then click OK

  5. Run the report to test your results.

Method 2: Unlock Page Layout and Drag Multiple Data Items to a List Column

In the reporting tool on a report page, in order to insert multiple objects in a single list column, you must unlock the page objects. The page is locked by default to prevent you from accidentally inserting multiple data items to a column. 

  1. Click the Lock Page Objects icon.
    The icon appears unlocked.

  2. Drag the First Name data item to your list.
    NOTE: If you want to arrange your data items in a table (for example to format a mailing address), insert a table into the list column, and then insert data items into the table.

  3. To add a space after First Name, from the Toolbox, drag a Text item to the First Name column and drop it to the right of the First Name data item.
    NOTE: As an alternative, you can add a space with the Padding property, by adding padding to the right of the First Name data item.

  4. In the Text box, type a space and then click OK.

  5. Click and drag the Last Name data item to the right of the space you just added in the First Name list column.

  6. Select the First Name column heading, and then in the Properties pane, in the Label field, type Name.
    The column heading is renamed.

  7. Click the Lock Page Objects icon.
    The page is locked. 

  8. Run your report to test the results of your concatenation.





Helpful Unhelpful

330 of 484 people found this page helpful

Send us a note about this article

Contact the OIT Service Center

Phone: 401-863-4357

Email: help@brown.edu

Location: Page Robinson Hall - 69 Brown St., Room 510

See our availability

https://it.brown.edu/get-help

Walk-ins Welcome! Appointments recommended.

For reserved service for a technical consult or a loaner check-out, you can schedule an appointment here.