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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

expression help

Hi all,

I have the following expression which i have given in script but the formula is not working at script level where if i take in text box i am geting correct value..

      if(Country='Brazil' ,

     ((if(Strategic_Part='Tubes' and not IsNull([U-D_NL9s]) and [U-D_NL9s]<>0 and [U-D_NL9s]<>0.01, mat_con_qua))*-1)*(([U-D_NL9s])*1.055),0)

Can you please help me why. with the formula what i write in script i am getting 46k but i should get 1.2K

Attached app for reference.

Labels (1)
18 Replies
bharatkishore
Creator III
Creator III
Author

Ok thank you sunny bhai.. now i got.  one final question sunny bhai i need to pass one else condition i.e.

if(Country='Brazil' ,

     ((if(Strategic_Part='Tubes' and not IsNull([U-D_NL9s]) and [U-D_NL9s]<>0 and [U-D_NL9s]<>0.01, mat_con_qua))*-1)*(([U-D_NL9s])*1.055),

         ((if(Strategic_Part<>'Tubes' and not IsNull([U-D_NL9s]) and [U-D_NL9s]<>0 and [U-D_NL9s]<>0.01, mat_con_qua))*-1)*(([U-D_NL9s])*1.200))

but the else condition is not working.. is there anything i am doing wrong?

sunny_talwar
MVP
MVP

Not working in the script?

bharatkishore
Creator III
Creator III
Author

Not even in text box.. it is showing as o. if i give one condition it is working..

bharatkishore
Creator III
Creator III
Author

Attached app sunny bhai..

sunny_talwar
MVP
MVP

I think you had a selection on Brazil... remove that it should be fine

bharatkishore
Creator III
Creator III
Author

Thank u sunny bhai... thank you so much...

bharatkishore
Creator III
Creator III
Author

Sunny Bhai if country is brazil then is it possible to the value for else condition. sorry to take your time..

sunny_talwar
MVP
MVP

May be this

If(Country='Brazil',

     If(Strategic_Part='Tubes',

          ((if(not IsNull([U-D_NL9s]) and [U-D_NL9s]<>0 and [U-D_NL9s]<>0.01, mat_con_qua))*-1)*(([U-D_NL9s])*1.055),

         ((if(not IsNull([U-D_NL9s]) and [U-D_NL9s]<>0 and [U-D_NL9s]<>0.01, mat_con_qua))*-1)*(([U-D_NL9s])*1.200)))

I might have missed a parenthesis... but give it a shot....

bharatkishore
Creator III
Creator III
Author

Thank you sunny bhai.. thanks a lot..