Ok first thing here.
Don’t use Calculated Columns. They are unnecessary. You want to be using measures wherever possible.
This is where this has come unstuck straight away and why I was really unable to give a solid answer straight away, because I wasn’t aware that these calcs where from columns instead of measures.
One thing I always mention around DAX is always just start with the simplest measures. Like I have done here.
From here this is where you need to start using iterating functions, like mentioned above, so that you can work through each row and run some logic.
if(DNA_HELP[EXFACTORY ACTUALS]=0,DNA_HELP[FORECAST],DNA_HELP[EXFACTORY ACTUALS]) )
Required Forecast =
if(DNA_HELP[Sum EXFACTORY FOR CUSTOMERMONTH]=0,DNA_HELP[FORECAST],DNA_HELP[Sum EXFACTORY FOR CUSTOMERMONTH]) )
Hopefully you are getting what I’m doing here. This is really important stuff and concepts you need to master as early as you can.
Here’s so videos to work through.
This part here I’m a bit confused about and don’t believe you really need it? This isn’t something I would recommend
I’m confident you could work out what you require in a measure quite easily.
Give this a go and see where you get to.
Model attached below
Sum EXFACTORY FOR CUSTOMERMONTH Problem.pbix (46.1 KB)