@sparse-coder Yup, you are absolutely correct variables evaluated before CALCULATE shouldn’t be used in the first argument of CALCULATE. Because variables in DAX are actually constants.
Also if you can share what else you are not able to understand then we will be able to clear your doubts.
Just a suggestion to the EDNA team is to put some kind correction note highlight with the video stating the time within the video where the error has occurred so people know before viewing the video course. This will give the team a chance to correct the video.
Table expansion happened with Ship Date, but the outer CALCULATE is being evaluated with Order Dates, that’s why you need to use it once again. Only when something was ordered and delivered on the same day then only your version of the code would sum the revenue.
Also, don’t use Expanded tables where column filters would work, this is a very expensive filter, on my database of just 10 million rows, calculation is taking 4-5 seconds to run.
And USERELATIONSHIP can cause performance issues with dataset of just 1 million, I saw Alberto Ferrari talking about it, just can’t remember where.
VAR can be a very good resource when working with complex measures.
What I do when creating a new measure with VAR is to actually test the output of EACH of the VAR statements as I build them. I simply comment out the RETURN part of the measure, and instead RETURN each of the VAR statements separately: