Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sabrina87
Contributor
Contributor

how to call a calculated value in load

Hi team,

 

I am calculating "LOB Criticality" value on the load, and i want to call it back on the same load to do another calculation but it is not working:

 

LOAD 

[name]

[LOB Field]

[criticality]

If  ([LOB Field]=1, 'ok','bad') as 'LOB Criticality'

 

if (len(trim([LOB Criticality]))=0,'blocked','not blocked') as 'blocked Y/N' -- this line is giving me an error. The "LOB Criticality" calculated field seems to be called in the wrong way but i dont know which should be the appropiate one

If someone can help, that will be really helpful

 

 

 

1 Solution

Accepted Solutions
mfchmielowski
Creator II
Creator II

Hi.

You can use preceding load in this.

Please note that field names with spaces should be in square brackets. 

Data:
load
	*
	, if (len(trim([LOB Criticality]))=0,'blocked','not blocked') as [blocked Y/N]
;
LOAD 
	[name]
	,[LOB Field]
	,[criticality]
	, If  ([LOB Field]=1, 'ok','bad') as [LOB Criticality]
inline [
	name, LOB Field, criticality
	a, 0, 1
	b, 1, 0
];

View solution in original post

1 Reply
mfchmielowski
Creator II
Creator II

Hi.

You can use preceding load in this.

Please note that field names with spaces should be in square brackets. 

Data:
load
	*
	, if (len(trim([LOB Criticality]))=0,'blocked','not blocked') as [blocked Y/N]
;
LOAD 
	[name]
	,[LOB Field]
	,[criticality]
	, If  ([LOB Field]=1, 'ok','bad') as [LOB Criticality]
inline [
	name, LOB Field, criticality
	a, 0, 1
	b, 1, 0
];