Forum Discussion

SBIM's avatar
SBIM
Icon for Helper I rankHelper I
3 years ago
Solved

MTD 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...
  • jdbuchanan71's avatar
    3 years ago

    SBIM 

    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
        )