How do I concatenate more than two columns?

Rebecca Lees shared this question 9 years ago
Completed

Hi,


I'm currently building a report that requires multiple fields to be concatenated. There is more than 3 fields. Is there a way to concatenate all the fields into one easy to use column?


Thank you,

Rebecca

Replies (3)

photo
1

Hi Rebecca,


Thank you for getting in touch. To concatenate more than two columns, you can create a calculated field and add together each of the string columns, separated (or not) by a space as seen below:


db8e608d17df2ea017b93af13180d422


To include the space, simply type a space, without quotes into the input box above the "undo" button.


Regards,

Nathan

photo
1

I tried this, but it ended showing a '0.0' for each record instead of 'Last, First'. I've attached my calculation (I did choose Text).

photo
1

Hello Austin

Greetings of the day

Thank you for your response. If we wish to add three columns, we can utilize the + symbol in the calculated field. I assumed you had not selected it from the columns. I have attached a video for your reference. Please inform me if you have any questions.

https://ftp.yellowfin.bi/f/2a7d973bce4cc2ce

Sincerely,

Siddartha Pathi

Yellowfin Technical Support Engineer

photo
1

Hello Austin

Greetings of the day

I wanted to follow up with you regarding the solution I provided in my last email. Did the solution we sent you resolve the issue?

Please let us know if you need additional support on this issue.

Thank you,

Siddartha Pathi

Yellowfin Technical Support

photo
1

Hello Austin

Greetings of the day

I hope the information I provided in my last response will be helpful. I wanted to let you know that I will be closing this request due to inactivity. However, please feel free to reach out if you would like to revisit this matter or if there is anything else I can assist you with.

Thank you,

Siddartha Pathi

Yellowfin Technical Support

photo
photo
1

This doesn't work for an Oracle database as Oracle uses pipes || rather than the plus sign +. Any idea how to do this for Oracle? Thanks.

photo
1

Hi Eva,


You will need to perform this by creating a freehand SQL calculated field, employing pipes rather than +s. If you have trouble implementing this please let me know and we can schedule a screen-share session.


Regards,

Nathan

photo
1

Hi Nathan,


This worked for me. I have tried to create another one where the columns come from another table but I get errors because since I have not yet added any columns from this table to my report, it does not join on that table and I get identifier errors. Why do we have to add at least one column to the report before we can create calculated fields to concatenate strings?

photo
1

Hi Eva,


Yellowfin's reports are essentially just compiling an SQL statement to present to you. So when there is only one column in the report, the SQL will simply select from that table alone. When you add a freehand SQL, the FROM clause in the underlying SQL does not change to include the new table join until you provide a column that naturally includes that table. I am not entirely sure why this is the case, but this issue has been raised in the past and the answer has always been: this is expected behavior, inherent in the way that freehand SQL functions work inside of Yellowfin.


Sorry that I can not be more specific and glad to hear you were able to achieve your results.


Regards,

Nathan

photo
1

OK, so basically I would have to add a column to get the join, create my calculated field to concat the strings I needed from that specific table, then hide the newly added column since I don't want to see it. This seems to work out. Thanks for your help.

photo
Leave a Comment
 
Attach a file