Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hello everyone,can you please explain how can i solve this problem?

Header 1productsalepurchase
A234kl
Bxmj
Cytn
Dz

suppose i want to calculate x then x=234-(k+l)

and again for y  ,  y=x-(m+j)

for z, z=y-(t+n)

how can i do this?

11 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Product Expression:

Alt(Above([Product])  - (Above(Sale) + Above(Purchase)), Sum(yourFieldProduct))

I think that work , if not can you attach a example (.xls or qvw)

Regards,

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

can you tell me how many rows do you have?


Not applicable
Author

Hi  amartinez35

that was just a sample,basically i may need my z value like this

Header 1productsalepurchase
A234kl
Bxmj
Cytn
Dzro
Eqsy

z= x-(m+j)

and q= y-(t+n)

so above function will not work for this problem

Not applicable
Author

As you can see i explained my question to Aurelin

mine table has  100 rows

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

See this qvw.

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

Hi  Aurélien Martinez

I can't use above everytime ,as i gave my requirements to you that its not possible that i always want the data just above the field

just go through my first reply

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

See this qvw.

PS: In script change Level value.

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

you can use Previous function in your script

ex.

Load *, Previous(Previous(TableName1)) - Previous(Previous(TableName2)) as [Previous Product]

or

you can use Peek Function.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/08/peek-vs-previous-when-to-use-each

Not applicable
Author

my peek function is not working

=sum(Pick(Forecast,4))-sum(Pick(Planned_Production,4)) +sum(Pick(Planned_Receipt,4))

Iam also using this

=sum((Pick(Forecast,4)-Pick(Planned_Production,4) +Pick(Planned_Receipt,4))

and

(Pick(Forecast,4)-Pick(Planned_Production,4) +Pick(Planned_Receipt,4)

but none of them is working  in 4th row i have numeric data in forecast,planned_production and planned_receipt

on which i am calculating data