If it possible I would prefer to embed the business logic into the data model.
The closed period is static and I guess you don't have the requirement to compare the fact to the past forecast.
You can assume the forecast as facts (Amount_$(vCurrency)) that just have different type (field flag).
Usually it helps to keep the expressions simply and clear to the end users.
Thanks for the reply although I didn't really understand the answer .
Anyway, I solved it by joining a Y or N flag to the concatenated fact table that contains both the budget and actuals figures like this:
LOAD * INLINE [
And then changing the expression to an if() statement, somehow an set analysis expression seemed impossible:
sum(if(_Flag_Actuals = 'Y',if(_FlagPnLi=1, Amount_$(vCurrency)) ,
if(_FlagPnLi=1 and ForecastType='Forecast_Actuals', Budget_$(vCurrency))))