Skip to Content
Aug 25, 2015 at 01:51 PM

HANA modeling - field comparison to filter records


Hi experts,

I'm trying to create an analytic view on HANA, but I've still have a problem... who look quiet simple !

I'm trying to use arrtibute view and calculation View to calculate

I have a table who give me value, for a Zone, and for a Date. we call it DISC_RATE

Area Valid from Valid To Discount Europe 01/01/2015 31.12.2015 0.10 Europe 01/01/2016 31.12.2016 0.15 Asia 01/01/2015 31.12.2015 0.08


Customer1 Invoice Date Amount Area TOTO 12/12/2015 100 Europe TOTO 12/12/2016 200 Europe TUTU 01/01/2016 300 Europe

I would like to have this result (discount rate depend of Area & Date)

Customer Amount Area Date Discount TOTO 100 Europe 12/12/2015 0.10 TOTO 200 Europe 12/12/2016 0.15 TUTU 300 Europe 01/01/2016 0.15

In SQL I used to wrote this

SELECT T1."Customer", T1."Amount", T1."Area", T1."Date", T2."Discount"


inner join "DISC_RATE" T2 on T1."Area" = T2."Area"

WHERE T1."Invoice Date"'>=T2."Valid From" and T1."Invoice Date"'<=T2."Valid To"

=> it was OK.

In Hana Analytic View,

- I cannot create filter like Field A >=Field B.

- I am not able to write complex join condition

Please, could you help me ?