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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If condition in a load script

Hi,

I would like to calculate and add a field in  a load script to avoid doing it in a dimension. So I would like to take the following and where it meets the following then add FTE.FTEYearEnd2011 to FTEYearEnd2011CurrentView.

Something like the following but I get erros in the script load. Can someone give me the proper syntax. I appreciate any assistance in advance.

if

([EmployeeDirectory.Team]={'OBG','MFM','GST','ORE','PED','PDS'}, FTE.FTEYearEnd2011,0) as FTEYearEnd2011CurrentView,

1 Solution

Accepted Solutions
somenathroy
Creator III
Creator III

You may try the below code:

IF([EmployeeDirectory.Team]='OBG' or

[EmployeeDirectory.Team]='MFM' or

[EmployeeDirectory.Team]='GST' or

[EmployeeDirectory.Team]='ORE' or

[EmployeeDirectory.Team]='PED' or

[EmployeeDirectory.Team]='PDS', FTE.FTEYearEnd2011,0) asFTEYearEnd2011CurrentView,

Regards,

Som

View solution in original post

2 Replies
somenathroy
Creator III
Creator III

You may try the below code:

IF([EmployeeDirectory.Team]='OBG' or

[EmployeeDirectory.Team]='MFM' or

[EmployeeDirectory.Team]='GST' or

[EmployeeDirectory.Team]='ORE' or

[EmployeeDirectory.Team]='PED' or

[EmployeeDirectory.Team]='PDS', FTE.FTEYearEnd2011,0) asFTEYearEnd2011CurrentView,

Regards,

Som

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I suggest this:

If(Match(EmployeeDirectory.Team, 'OBG','MFM','GST','ORE','PED','PDS'),

     FTE.FTEYearEnd2011, 0) As FTEYearEnd2011CurrentView

Hope that helps

Jonathan

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