here's my example:
my formula @dispatch profit is needing to be displayed for the current month and the previous 2 months.
Dispatch Profit is calculated by 2 other formulas added together:
@net total MLA + @mlt net total US(we have two companies, one MLA the other MLT)
@net total MLA is equal to the field net_total added up for every record for a particular user where company=MLA
@mlt net total US = basically the same thing where company=MLT
those 2 values are then added together, I then have a summary to sum the dispatch profit within my group, grouped by "pickup date" for each month, where pickup date is a date field on each record.
Each record has a net total, and either is company MLA or MLT for reference to the formulas above.
I added in the below to the select expert as you mentioned:
{SHIPMENTS_TTX.PICKUPDATE} in dateserial(year(currentdate), month(currentdate)-2,1) to currentdate
Which if I understand correctly pulls only the shipments where pickupdate is within 2 months prior to to the current month.
My expectations for the current month, previous month, and previous month to that, ex. May, April, March, I have set as ex.
/{@currentexpect}:
if {SHIPMENTS_TTX.PICKUPDATE} in dateserial(year(currentdate),month(currentdate),1) to currentdate then {?Pm-Current Expectation}
which if I understand correctly will display what I input for my parameter for current expectation, ex. 20000, if the pickupdate is in the current month.
This seems to work, but fills in "0" for the other months as my @currentexpect, @previousexpect, and @previous expected2 are all within that same grouping by pickupdate...
I've attached the pdf of the report when its ran
The other 2 things I will do when this is correct is calculate the % of goal(expected) reached, so Sum of dispatch profit/@current expected, etc.
Then over or under goal, Sum of Dispatch Profit - @current expected, etc.
Any help would be appreciated.