Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional check

image2.png

In my code i am trying to give weightage as 100 if the 3 conditions are true ,75 if only 2 conditons are true, 50 if only primary skills is true.

help me to do this..

if [Primary Skills]=='java' then

weightage= '50'

elseif [ Primary Skills]=='java' and subskills_1=='Java Enterprise - Front End' then

weightage='75'

ELSEIF  [ Primary Skills]=='java' and subskills_1=='Java Enterprise - Front End' and subskills_2=='Java Enterprise - Back End' then

weightage='100'

 

end if

1 Solution

Accepted Solutions
sunny_talwar

Where are you trying to do this? Front end or back end?

View solution in original post

11 Replies
sunny_talwar

Where are you trying to do this? Front end or back end?

Not applicable
Author

In script

Not applicable
Author

In script

sunny_talwar

Should be like this

LOAD [ Primary Skills],

     subskills_1,

     subskills_2,

     If([ Primary Skills] = 'java',

          If(subskills_1 = 'Java Enterprise - Front End',

               If(subskills_2 = 'Java Enterprise - Back End', 100, 75), 50)) as weightage

FROM ....

UPDATE: Missed a closing parenthesis... added now

beunderf
Partner - Creator II
Partner - Creator II

It would be somthing like this in your load script:

IF([ Primary Skills]=='java' and subskills_1=='Java Enterprise - Front End' and subskills_2=='Java Enterprise - Back End'      ,100

,IF([ Primary Skills]=='java' and subskills_1=='Java Enterprise - Front End'

     ,75

IF(if [Primary Skills]=='java'

     ,50))) 

          AS  weightage

manoranjan_d
Specialist
Specialist

suppose if we are trying to do in front end how we will do?

sunny_talwar

This should do it

If([ Primary Skills] = 'java',

          If(subskills_1 = 'Java Enterprise - Front End',

               If(subskills_2 = 'Java Enterprise - Back End', 100, 75), 50))

Not applicable
Author

thank you.. that would be helpful

Not applicable
Author

oh thank you..