I have 2 queries created
Query 1
Year, Quarter, Customer, Month, Est Sales, Actual Sales
Query 2
Current Month
In the report, I will compare the Month (Query 1) with Current Month(Query 2).
If Month >= Current Month, then Est Sales will show up
else Actual Sales.
Now what I did is to define a variable as measure type
V_Current_Month = Max([Current Month])
The formula for each quarter should be:
=[Est Sales] where ([Month]>=[V_Current_Month]) + [Act Sales] where ([Month]<[V_Current_Month])
But it didn't work for me.
then I output this variable to report, it's exactlly 3, If I hard code the variable "V_Current_Month" to 3, it works,
So what's the difference between the variable I defined and the hard-coded one?
Edited by: GodBlessMe on Mar 22, 2010 6:05 PM