Forum Discussion
SBIM
Helper I
3 years agoMTD Measure Showing Prior Month Results
I have a measure that uses a fiscal year and month to sum the most recent month like this. FMTDSales = CALCULATE( SUM(JobsWithMilestones[GrossAmount]), JobsWithMilestones[Contractfisc...
- 3 years ago
Try it like this where we get the max MonthYear across all markets and use that.
FMTDSales = VAR _MonthYear = CALCULATE ( MAX ( JobsWithMilestones[ContractfiscalYearMonth] ), ALL ( JobsWithMilestones[Market] ) ) RETURN CALCULATE ( SUM ( JobsWithMilestones[GrossAmount] ), JobsWithMilestones[ContractfiscalYearMonth] = _MonthYear )
jdbuchanan71
Super User
3 years agoTry it like this where we get the max MonthYear across all markets and use that.
FMTDSales =
VAR _MonthYear =
CALCULATE (
MAX ( JobsWithMilestones[ContractfiscalYearMonth] ),
ALL ( JobsWithMilestones[Market] )
)
RETURN
CALCULATE (
SUM ( JobsWithMilestones[GrossAmount] ),
JobsWithMilestones[ContractfiscalYearMonth] = _MonthYear
)SBIM
Helper I
3 years agoThat did the trick thanks for the quick response.