Using set analysis to get a set of dates based on variables
I have a problem that I have struggled with for too long. The basic problem is that I want to get the sum of sales between two different dates, based on variables. When I write my expression using two static dates, it works. Below it the code with static dates:
As you can see I use the numeric value for dates. In my load script I have created an extra field "OrderDateNum" for matching. Maybe I have made things more complex, but I have tried and googled everything. It all comes down to converting I think. Below it the expression that I have tried:
I have the two variables _vChosenDate and _vMTD_start_date, and they are booth the numeric versions of dates. Apparently the upper limit variable "_vChosenDate" is used, but not the lower limit variable.
Re: Using set analysis to get a set of dates based on variables
Thanks, but your suggestions didn't work. I'm putting this problem on hold for today, so that I can look at it with new perspective tomorrow.
What puzzles me is that when I user numbers in my expression (my first example) it works fine, and when I look at my variables in text-boxes they show the exact same numbers. But when I try to use the variables in the expression, it doesn't work. What I need is some nice way of looking at tables and varables and show the data types, to make sure that I have it right.