5 Replies Latest reply: Jan 2, 2018 1:16 AM by Avinash R

# 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

• ###### Re: Quantity and rate from different periods

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))

• ###### Re: Quantity and rate from different periods

How the Previous(Period) get identified ?

• ###### Re: Quantity and rate from different periods

Hi

1:do you use period in the table ?

please attach a sample to work on ..

• ###### Re: Quantity and rate from different periods

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