Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Cumulative total (last week)

Hello  -  Currently I have this measure which gives me the YTD cumulative total that I need, by week.   However, I would like to have another measure that gives me the cumulative total, but for the p...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hello sevenhills    I had a chance to play around with the formula above and was able to make minor tweaks to get what I needed and correct the issue that was happening with your measure.    The issue was that the very last cumulative date in the previous week column was matching with the actual previous week's total as I mentioned in a previous post.    I've changed it to this, which now captures my last row correctly according to what I need.   Thanks for getting me on the right path!   Will mark your answer as a solution  (with minor tweaks) ğŸ˜€

     

    Prev Cumulative Week RMA Count =
    VAR CurrentWeek = MAX('Date Table'[WeekEnding])
    RETURN CALCULATE([Distinct Count of RMAs], ALLEXCEPT('Date Table','Date Table'[WeekEnding]),'Date Table'[WeekEnding]<= (CurrentWeek - 1) )