Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello together
The following problem as an example:
We sell apples for 1.50€. From 01.03.2022 - 30.04.2022 the purchase price was 1€. From 01.05.2022 - Now the purchase price is 1.15€.
I have now sold 100 apples. 40pcs before 01.05.2022 60pcs after. Each apple has its own sales date stored.
I maintain the purchase prices in a separate table with 3 columns (date valid from - date to + price).
Now he should automatically take the right price.
I have already looked at the "IntervalMatch" function, but do not quite understand this if it should be the right one
Greetings
Hi,
You could try using an if statement to achieve this, something like this:
if(([AppleSellDate] > [date valid from]) and ([AppleSellDate] < [date valid to]), Price) as ApplePrice
Kind regards