General OBIEE

Get Involved. Join the Conversation.

Topic

    Shree Pawar
    Display values from two columns in oneAnswered
    Topic posted February 18, 2016 by Shree PawarBlue Ribbon: 750+ Points, tagged Reports 
    101 Views, 4 Comments
    Title:
    Display values from two columns in one
    Content:

    I would like to display the values from columns Minimum Salary and Maximum Salary under one column called Salary Range. They don’t need to be added etc., just listed together separated as shown below.

    Minimum Salary     

    Maximum Salary    

    Salary Range

    $45,000.00

    $55,000.00

    $45,000.00

    $55,000.00

     

    I tried to use the COCATE function from within the Formula editor along with CAST to convert the string to text, but I’m still getting an error. Can someone help me figure out what I’m doing wrong?

    CONCAT((CAST("Requisition Compensation"."Minimum Salary" AS Text(40)), CAST("Requisition Compensation"."Maximum Salary" AS Text(40)))

    Thanks

    Best Comment

    Gail Langendorf

    I'm not sure what subject area you are using. In my own example the ranges are already not numeric. You can test this by running the results without the formula. If the column's contents are left justified then they are not numeric. This is the formula that currently works for me on the Compensation - Salary Details Real Time subject area:

    concat(CONCAT("Salary"."Salary Range Low",' - '),"Salary"."Salary Range High")

    I have also added spaces & a dash.

    Comment

     

    • Gail Langendorf

      I'm not sure what subject area you are using. In my own example the ranges are already not numeric. You can test this by running the results without the formula. If the column's contents are left justified then they are not numeric. This is the formula that currently works for me on the Compensation - Salary Details Real Time subject area:

      concat(CONCAT("Salary"."Salary Range Low",' - '),"Salary"."Salary Range High")

      I have also added spaces & a dash.

    • Raghavendra Raghunath

      There is no conversion string as 'Text', it should be 'CHAR'

    • Shree Pawar

      Thanks for your replies Gail & Raghavendra.

      I used CAST with Varchar and only the CONCAT symbols and it worked. In case anyone in interested, here is the formula

      CAST("Requisition Compensation"."Minimum Salary" AS varchar(40)) || ' - ' || CAST("Requisition Compensation"."Maximum Salary" AS varchar(40))

    • Gail Langendorf

      Thanks for sharing!