Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner - Creator
Partner - Creator

Quantity and rate from different periods

Dear Experts,

I have two tables one with quantities and one with rates, period and item wise. joined through composite key item+period. Now

Sum(quantity*rate) is giving perfect result for selected period.

I want if the selected periods dont have rates then it should pick rates from the previous period.

Regards

Zahid Rahim

5 Replies
Anonymous
Not applicable

I am just providing an idea ..

Expression 1 :Sum(quantity*rate)




Expression 2 :sum(quantity*Alt(rate,1)


or

Expression 2 :sum(quantity*Alt(rate,Previous(Period))

pradosh_thakur
Master II
Master II

Hi

1:do you use period in the table ?

please attach a sample to work on ..

Learning never stops.
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

How the Previous(Period) get identified ?

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Yes Periods exist in the table. only current period don't have any data but rates exist.

avinashelite

It's a missing data scenario...I would suggest you to start populating the  missing data in the back end ...check this post

Generating the missing data with previous data