Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Seven Day Sum with Multiple Filters

Hello,   I have a measure that is meant to sum the previous seven days of a filtered table. The measure works well when a single location is selected in a slicer but I am having trouble getting the...
  • v-lili6-msft's avatar
    7 years ago

    hi, Anonymous 

    You could try this formula as below:

    PaidSevenDaySum Multi Location = var a=MAXX('Labor','Labor'[CalendarDate])
        return Calculate(sum(Labor[DailyLabor]),filter(ALLEXCEPT(Labor,LocationInformation[LocationID]),Labor[Labor_report_description]="Total Paid (D + I)" 
            &&'Labor'[CalendarDate]>a-7
            &&'Labor'[CalendarDate]<=a)
            )
     

    Result:

    Best Regards,

    Lin