Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add columns in script

Hi All,

I have a question about uploading excel data Qlikview.

One column "budget" in the data table contains as well hours as costs.

Is it possible to add a formula in the script that qlikview makes two columns: hours and Costs and fill it right.

The filter or verticale search can be set by another column "vakgroep".

Example:

Current situation

Vakgroep Budget

EWT 3

EET 2,5

MAT 1000

DER 750

EBT 6

MAT 65,95

EWT 0,5

DER 957,6

Desirable situation:

Vakgroep Budget Hours Costs

EWT 3 3

EET 2,5 2,5

MAT 1000 1000

DER 750 750

EBT 6 6

MAT 65,95 65,95

EWT 0,5 0,5

DER 957,6 957,6

MAT en DER is always Costs

EWT, EET, EBT is always Hours (starts with an "E").

I can do this each time by hand in Excel but maybe Qlikview can do that by changing the script.

Thank you in advance

1 Solution

Accepted Solutions
pat_agen
Specialist
Specialist

hi,

you can create your new fields with some script code like this


load
Vakgroep,
Budget,
if(match(Vakgroep,'EWT','EET','EBT','EWT')>0,Budget) as budHours,
if(match(Vakgroep,'MAT','DER')>0,Budget) as budCosts
...


View solution in original post

2 Replies
pat_agen
Specialist
Specialist

hi,

you can create your new fields with some script code like this


load
Vakgroep,
Budget,
if(match(Vakgroep,'EWT','EET','EBT','EWT')>0,Budget) as budHours,
if(match(Vakgroep,'MAT','DER')>0,Budget) as budCosts
...


Not applicable
Author

hi,

PatAgen was quick.

Here for you

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.49.52/Budget.qvw]

regards

Sravan