I am stuck with this scenario, could you plz help me how to write script in backend to find Quantiy, show in below table. Here i want to show such data in Bar chart, weekNumber As Dimension and SIN,SOUT,Quantity as Measure.I want to write expression for Quantiy in the backend only.
Week1
Week2
Week3
Week4
Sell in
1000
0
0
0
Sell Out
700
420
80
45
Returns
0
20
0
10
Quantity
300
300+(0-420)+20=100
100+(0-80)+0=-20
20+(0-45)+10=-15
For understanding purpose only i show like cross table, actually my data is like normal table with col weekNO, SIN,SOUT, Return. I want expression for Quantity in backend only. I used Previous() function but i am not able to write complete logic.