Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Combine fields

How to combine multiple fields in to one

eg:

product

customer

amount 

these 3 in to a field called as Details how can it be done where in then the details field will have product, customer and amount as field values?

3 Replies
Not applicable

Re: Combine fields

You can use product&customer&amount

the & is a concatenation function. Also you may use Concat

concat([{set_expression}]  [ distinct ] [ total [<fld {, fld}>]] expression[, delimiter[, sort_weight]])

Returns the aggregated string concatenation of all values of expression iterated over the chart dimension(s). Each value may be separated by the string found in delimiter. The order of concatenation may be determined by sort-weight. Sort-weight should return a numeric value where the lowest value will render the item to be sorted first.

Examples:

concat( Code, ';' )     

concat( FirstName&' '&LastName, ',' )    

concat( distinct Code, ';' )     

concat( total Name, ';' , Date )    

concat( total <Grp> Name, ';' , Date)    

Not applicable

Re: Combine fields

let me show you an example,

ProductCustomerorder
prod 1name 1 order1
prod 2name2order2
prod 3name3order3

then my result column will have

Details
Product
Customer
Order

details will get the product, customer and order which in turn have their values from past table.

jagan
Not applicable

Re: Combine fields

HI,

Try this

LOAD

     Product,

     Order,

     Customer,

     Product & Order & Customer AS Details

FROM SourceData;

Hope this what you are expecting.

Regards,

jagan.