It is probably a matter of when the variable is being evaluated. If you define the variable vFirstOrderDate with no equal sign it will be defined as a string that later can be evaluated with a $-sign expansion in the straight table. If it has an equal sign it will not look like a string but as an expression and it will be evaluated immediately. That means that it will not have any dimensions that qualify it and will pick the first date in your calendar.
In the load script the variable can be created like this:
This works great for the straight table. but I want to be able to count how many orders were created in a given week/month/year whatever my selection may be. I get the error "nested aggregation not allowed" when i attempt to count the $(vFirstOrderDate).