I have a few measures that I am using in a Switch statement in order create a measure like this:
GraphicalMoney:=Switch([FiscalPeriod], 0, [CarryoverMoney], 1, [ActualMoney]-[CarryoverMoney], [ActualMoney])
Where [FiscalPeriod] s a value 0-12 (1 for each month plus 0 is carryover)
So, in FiscalPeriod 1, we want to subtract the carryover from actual because of the way the data exists
That measure works fine for us, the problem comes when we try to calculate a YTD amount based on that measure like this:
YTDGraphicalMoney:=TOTALYTD([GraphicalMoney], [EndDate], "9/30")
Where [EndDate] is the date associated with the records and 9/30 is that last day of the year for us.
This YTD calculation doesn't work correctly for us. FiscalPeriod 0 is correct and FiscalPeriods 2-12 are all correct, but for some reason FiscalPeriod 1 for the YTD calculation is wrong, it's just displaying the [GraphicalMoney] amount for that period instead of what I would expect YTD to calculate which is the sum of period 0 and period 1 at that point. The weird thing is periods 2-12 are correctly aggregating like I would expect them to.