Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Repeater Object Issue in the CSV

    Posted Fri December 04, 2020 03:06 AM
    Hi Team,

    I am using a Repeater object in the report to show a column data to display in a single cell of a row which is the requirement. The repeater works fine and output shows properly in excel but when ran in csv, the repeater object won't work properly and some of data gets truncated. So the repeater object wont work properly in csv is what i understand. But is there any other alternate way of doing this requirement?? we don't have access to the database for this package. And other thing is that the excel output when made a save as in csv shows the trailing commas at the end of the header and and the footer which is not correct, and this approach is also of no use. Any ideas or anybody faced this issue??

    Actual data:
    -------------
    col1    col2
    1           a
    1            b
    1            c

    Required:
    ---------
    col1       col2
    1             a,b,c

    ------------------------------
    Nagaraju Janmanchi
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Repeater Object Issue in the CSV

    Posted Fri December 04, 2020 02:57 PM
    Hi Nagaraju,

    If there not a lot of different values for [col2], you could try this.
    Create a query with items:
    [col1], [col2] and [RankNo] with the expression: rank ( [col2 ASC for [col1] )

    Create a second query with the first query as input and drag [Query1.[col1] in the data items from [Query2].
    Add a query item with the following expression:
    [concat column] =
    trim ( trailing ', ';
    maximum ( if ( [Query1].[RankNo] = 1 ) then ( [Query1].[col2] ) else ( '' ) ) || ', ' ||
    maximum ( if ( [Query1].[RankNo] = 2 ) then ( [Query1].[col2] ) else ( '' ) ) || ', ' ||
    maximum ( if ( [Query1].[RankNo] = 3 ) then ( [Query1].[col2] ) else ( '' ) ) || ', ' ||
    maximum ( if ( [Query1].[RankNo] = 4 ) then ( [Query1].[col2] ) else ( '' ) ) || ', '
    )

    ------------------------------
    Thomas van der Meer
    ------------------------------