Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
akuttler
Creator
Creator

Create Concat Field

Hello,

In the data load editor...how do I add a new field that concatenates three other existing fields?

Load script below:

Patient_Ledger_2017:

LOAD

    ENCID,

    ITEMTYPE,

    "Transaction Date",

     "Transaction Time",

     "Service Date"

    Trans,

    CPT,

    UNITS,

    PracticeName,

    LocationName,

    RenderingPhysician,

    BillingProvider,

    "Encounter Total Charges",

    PATIENTID

FROM [lib://BACKUP/PTLEDGER_2017.csv]

(txt, utf8, embedded labels, delimiter is ',', msq);

I want to load an additional field that concatenates "Service Date", RenderingPhysician, and PATIENTID for each row.

1 Solution

Accepted Solutions
its_anandrjs

May be this

Patient_Ledger_2017:

LOAD

    ENCID,

    ITEMTYPE,

    "Transaction Date",

     "Transaction Time",

     "Service Date"

    Trans,

    CPT,

    UNITS,

    PracticeName,

    LocationName,

    RenderingPhysician,

    BillingProvider,

    "Encounter Total Charges",

    PATIENTID,

   "Service Date" & RenderingPhysician & PATIENTID as New_Fields

FROM [lib://BACKUP/PTLEDGER_2017.csv]

(txt, utf8, embedded labels, delimiter is ',', msq);

View solution in original post

6 Replies
its_anandrjs

May be this

Patient_Ledger_2017:

LOAD

    ENCID,

    ITEMTYPE,

    "Transaction Date",

     "Transaction Time",

     "Service Date"

    Trans,

    CPT,

    UNITS,

    PracticeName,

    LocationName,

    RenderingPhysician,

    BillingProvider,

    "Encounter Total Charges",

    PATIENTID,

   "Service Date" & RenderingPhysician & PATIENTID as New_Fields

FROM [lib://BACKUP/PTLEDGER_2017.csv]

(txt, utf8, embedded labels, delimiter is ',', msq);

mdmukramali
Specialist III
Specialist III

Hi,

try in your script

"Service Date"&'-'&RenderingPhysician&'-'&PATIENTID as NewFiled.


petter
Partner - Champion III
Partner - Champion III

You add an extra line before the FROM clause:

"Service Date & RenderingPhysician & PATIENTID AS NewField,


Often you want to add some separator between the concatenated values:


"Service Date" & ' ' & RenderingPhysician & ' ' & PATIENTID AS NewField,


akuttler
Creator
Creator
Author

Thank you they all work.

its_anandrjs

Good one can you close the thread now with appropriate answers for the responses.

its_anandrjs

Another and good way also by using Dash for field separators

"Service Date" & '- ' & RenderingPhysician & '-' & PATIENTID AS NewField