Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a new column using column name

i have a column name that includes the Phase and year (14Construction) and the data is $$$ value. How do i slit the phase which is construction and the year?

Example:

14Construction          15Designed

$$$                              $$$

$$                                   $

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In your load script:

LOAD Left(YrPhase, 2) & 2000 As Year,

     Mid(YrPhase, 3, 50) As Phase,

     ...

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

on top is what i have (and there are multiple column with different years and phases)  and on the bottom is what I'm trying to accomplish.

PhaseYearsTotals
Planning RO14$136,000
Planning AO1414,000
Design RO132,000
Design AO131,000
….14200,000
14
16
Planning RO15
Planning AO15
jonathandienst
Partner - Champion III
Partner - Champion III

I see the field names contain the year and phase information.

You might need a crosstable load to get this data into a more manageable fact style table. Check out crosstable loads in the manual. If you need more help on the crosstable, I suggest that you post some sample data here. The attach file option is available if you click on "Use advanced editor" on the reply window.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

this is only good for excel for example and not when connecting directly to the database. i want to do a crosstable in the script that already pull if is possible. my source is not Table Files, is ODBC.