Discussion Board for collaboration on QlikView Scripting.
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.
I am just providing an idea ..
Expression 1 :Sum(quantity*rate)
Expression 2 :sum(quantity*Alt(rate,1)
Expression 2 :sum(quantity*Alt(rate,Previous(Period))
1:do you use period in the table ?
please attach a sample to work on ..
How the Previous(Period) get identified ?
Yes Periods exist in the table. only current period don't have any data but rates exist.
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