Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting value from previous column, from previous week

Hello.

I've got something like this:

bilansa.PNG

and I've got a question about this:

How could I make CurrentStock be equal to Bilans from previous week (Fabric_CW)?

I've tried a few solutions and none of them was able to get value from another week(for example, column() gets values only from the same week and isn't able to get values from another set of fields - here, from previous week)

1 Solution

Accepted Solutions
sunny_talwar

Is this what you are intending to get?

Capture.PNG

If yes then please find attached

Best,

Sunny

View solution in original post

10 Replies
sunny_talwar

May be this:

Before(YourExpression) //yourExpression needs to have a set analysis {<Fabric_CW = {'Bilans'}>}

Not applicable
Author

Hello,

Could you expand your answer?

Either it's not working or I don't understand it.

sunny_talwar

Can you share the expression you are using right now???

Not applicable
Author

It looks like this:

Bilans: Supply - DemandLeft (shortened version)

and expanded version (Bilans):

(SUM({<FACTORY_STOCK_ID>} S_FABRIC_SUPP_QTY_CON - S_FABRIC_SUPP_QTY_DEL)) - (IF(FACTORY_ID=FACTORY_STOCK_ID, SUM({<FABRIC_ID>}S_FABRIC_QTY), 0)) - (IF(FACTORY_ID = FACTORY_STOCK_ID, SUM({<S_FABRIC_CW>} S_FABRIC_NED), 0))

sunny_talwar

Would you be able to share a trimmed down version of your app or a sample to look at?

Not applicable
Author

I attached file with this table, Everything looks like this, but I'd like to have bilans from week 27 at week 28 (it can't be just calculated from the previous week, because I'll need it for much more weeks)

sunny_talwar

Is this what you are intending to get?

Capture.PNG

If yes then please find attached

Best,

Sunny

Not applicable
Author

Yes, that's great.

I didn't know that it works like this, thank you very much!

sunny_talwar

No problem

I am glad I was able to help.

Best,

Sunny