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: 
Anonymous
Not applicable

If statement

Hello,

Can you please help me in the formula for IF statement.

I have a column with three numbers Column A = 30000; 27000; 23600

I want to make column out of this data using IF statement

like (IF(ColumnA=30000), "Megatruck", IF((ColumnA=27000), "standard", error))

Thank you in advance,

Sachin

7 Replies
Anonymous
Not applicable
Author

Looks like the brackets are wrong, maybe try something like this :

IF ( ColumnA=30000

, "Megatruck"

, IF ( ColumnA=27000

, "standard"

, error )

)

Anonymous
Not applicable
Author

No it doesnt work

here is the formula from qlik sense

IF ( [Chargable weight/PTasab_cont_]=30000, "Megatruck", IF ( [Chargable weight/PTasab_cont_]=27000, "standard", "error" ))

It gives "megatruck","standard","error"is not valid

Anonymous
Not applicable
Author

Is you first field actually called

[Chargable weight/PTasab_cont_]


Or do you need to divide one field by another like this :


[Chargable weight] / [PTasab_cont_]


Anonymous
Not applicable
Author

The field is called


[Chargable weight/PTasab_cont_]


its a column name

Anonymous
Not applicable
Author

In that case I don't know what is adrift, could you post full load statement from the script ?

Sometimes a typo elsewhere can cause an ok bit to error out.

Anonymous
Not applicable
Author

Captura.PNG

From the column (chargable weight) which has numbers, I need to create a new column, it can be dimension od measure. Where i need to get or show 30000=megatruck, 27000 standard & 23400=  error.

I hope this helps

Anonymous
Not applicable
Author

Personally I would create a new field for it in the back end script.