I have a case about calculation based on date valid range. As you can see below, There are Transaction and Validation Table, then I try to get sum(QTY*HARGA) based on date valid range of PRODUCT A, in the final result of sum(QTY*HARGA) must be 540000. But after I did the calculation the result is 1100000. I was confused why the result is not correct, so I make a new table to check in detail, and I saw there are some TGL TRANSAKSI include even not in date valid range (GET_DateFrom).
My question is how take out the TGL TRANSAKSI which is "must not include"? Does anyone have any advice? I attached the Qvw & data also. Hopefully, it can help.