Forum Discussion

kmoxley's avatar
kmoxley
Frequent Visitor
9 years ago

removing running totals

Anyone got a way to take a collum of running total (cumulitive collumn of weekly data) and make it show weekly totals 

2 Replies

  • v-caliao-msft's avatar
    v-caliao-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    kmoxley,

     

    To get weekly running total, you can use the DAX expression below.
    Create a calculated column.
    WeekStartDate = DATEADD(Sales[Date],1-WEEKDAY(Sales[Date]),DAY)

    WeeklyRunningTotal = CALCULATE(SUM(Sales[SaleAmount]),DATESBETWEEN(Sales[Date],LASTDATE(Sales[WeekStartDate]),LASTDATE(Sales[Date])))

    • kmoxley's avatar
      kmoxley
      Frequent Visitor

      Thanks, but I need the oposite.

      I have a weekly running total already, I need the sales per week