thank you for your swift response, tried to make it work but as soon as i want to use the part "EARLIER" then i get errors. According to PBI, the system expects this; "EARLIER(Columnname[Number])returns the value in the column prio to the specified number of table scans (default is1)". My measure looks like:
potential stock prepared amount=
"CALCULATE(SUM(Orders[StockPreparedEURO]);FILTER(ALL(Orders);[Product_Code]=EARLIER(Orders[ConfirmedDate]) BUT then i get this error...the syntax for ')' is incorrect (DAX(CALCULATE.....)"