cancel
Showing results for 
Search instead for 
Did you mean: 

How do you combine two different fields into one column?

Former Member
0 Kudos

Hi All,

I am hoping that someone can tell me how I combine two separate fields into one field within a BOBJ report. I have two fields that share the same data, but when I merge the two fields I do not want any of the values that appear in one column to merge into the same value in the other column. I will need the data that appears more than once to appear as many times as it shows up.

So for example, when pulling in two fields into BOBJ, they look like this:

But, I am trying to get to this outcome:

Any guidance on how I accomplish this would be much appreciated!

Thank you!

Accepted Solutions (0)

Answers (3)

Answers (3)

mhmohammed
Active Contributor

Can you create 2 different queries and merge those 2 columns? Or, create 1 query with 2 combined queries (1st combined query should have 1st object, and 2nd combined query should have 2nd object?
After that, when you bring in just 1 column (as a result of either of the previous suggested steps), right click on the table and check the box for Avoid duplicate row aggregation.

former_member385171
Participant
0 Kudos

Hi Layne,

A workaround could be

Step 1: Create Query 1 For Item Purchased

Step 2: Create Query 2 For Item Sold

Step 3:Create a variable as "Q2-Item" with formula as '=[Query 2].[Lines]+" "'

Step 4: Merge Q1-Item Purchased and variable Q2-Item

Attaching screenshot for your reference.

Hope it will help.


Reagrds,

SK

569643.jpg

Former Member
0 Kudos

@mhmohammed I have tried to create 2 queries (pulling one field in query 1 and then the other field in query 2) and then merging the fields together, but unfortunately it does not work. When I merge the two fields together, only the data from one of the fields is displayed.

Thanks for the comment. Have any other ideas?