Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Header 1 | product | sale | purchase |
---|---|---|---|
A | 234 | k | l |
B | x | m | j |
C | y | t | n |
D | z |
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?
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
can you tell me how many rows do you have?
Hi amartinez35
that was just a sample,basically i may need my z value like this
Header 1 | product | sale | purchase |
---|---|---|---|
A | 234 | k | l |
B | x | m | j |
C | y | t | n |
D | z | r | o |
E | q | s | y |
z= x-(m+j)
and q= y-(t+n)
so above function will not work for this problem
As you can see i explained my question to Aurelin
mine table has 100 rows
See this qvw.
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
See this qvw.
PS: In script change Level value.
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
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