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: 
swarnendu
Creator II
Creator II

Problems in script

Hello guys i have facing a problem in script level.

i want to pick value in row using condition. please see my attach file.

i have two filed which name one is opening quantity and one is closing quantity

i will create a calculated filed which name is  NewOpqty.

please see my image file and also see my script if you have any idea then please share with me.

i need this condition if(opening quantity<>0 ,opening quantity,peek(opening quantity)) and also need this condition 

if closing quantity<>0 then peek(closing quantity) or opening quantity.

But some how my condition will not working.


Thanks in advance

Swarnendu.

errh.jpg

11 Replies
Anil_Babu_Samineni

Not sure, I understand your concern. Can you please share sample?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
swarnendu
Creator II
Creator II
Author

Please check my .qvw file

Anil_Babu_Samineni

Which table we need to look?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
swarnendu
Creator II
Creator II
Author

The table name is Final_Stock

swarnendu
Creator II
Creator II
Author

I used this condition ....

if( New_MasterCode <> Peek(New_MasterCode) , If( MasterCode <> Peek(MasterCode),  IF( Opening_Qty <> 0 ,Opening_Qty , Peek(NewOpQty) ) ), If(Opening_Qty = 0 ,Peek(Closing_Qty) , Opening_Qty)  )  as NewOpQty,

but its not working

Anil_Babu_Samineni

That means, You are going to call 2 if..else statement using single IF statement? Isn't it?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
swarnendu
Creator II
Creator II
Author

Brother i want a new column which is depends on opening qty and closing qty.

i have opening for each new master code which have only one date.

i just need if opening quantity is 0 then its peek opening quantity depend on closing quantity if closing quantity has value then opening is show me the closing value.

swarnendu
Creator II
Creator II
Author

just check in master code='2793' and new master code =' 7268'

and check the filed NewOpQty.


i just want to remove the 0 values  with 3.16 till 5.16


egg.png

sunny_talwar

You complete logic seems to be not right... can you put it in words what this is suppose to do?