Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: Problems in script

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

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)
Highlighted
Creator II
Creator II

Re: Problems in script

Please check my .qvw file

Highlighted

Re: Problems in script

Which table we need to look?

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)
Highlighted
Creator II
Creator II

Re: Problems in script

The table name is Final_Stock

Highlighted
Creator II
Creator II

Re: Problems in script

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

Highlighted

Re: Problems in script

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

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)
Highlighted
Creator II
Creator II

Re: Problems in script

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.

Highlighted
Creator II
Creator II

Re: Problems in script

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

Highlighted

Re: Problems in script

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