Forum Discussion

cartercjb's avatar
02-09-2022

MTD SUM BY EACH WEEK IN MONTH

Hello Sisense Community!
I have the following draft of a column chart:

There is a dashboard filter = last month (Jan. 2022). This is currently showing a sum value for each week based on this formula:

(SUM([METRIC]),[Weeks in Date])

 My goal is to maintain the same weekly view, but instead, calculate a MTD sum view for each week. This would look like the following screenshot I made in Excel:

Any suggestions on the best way to accomplish this?

Thanks!

-Carter

4 Replies

Replies have been turned off for this discussion
  • Hi cartercjb !
    You could use RSUM() function for accumulating your measure by the sorting order of the dimension.

     

    RSUM((SUM([METRIC]),[Weeks in Date]))

     

     

    • cartercjb's avatar
      cartercjb
      ETL

      Thank you, Angelina_QBeeQ !! What if I were to flip this around just slightly..  

       

      So I have a KPI that is showing a MTD sum. Below that I would like to display a trending microchart that shows the same MTD sum calculation, but from 7 days ago. So it would essentially be a MTD sum from last week. Any suggestions on that? THANK YOU!

      harikm007 

      • Angelina_QBeeQ's avatar
        Angelina_QBeeQ
        ETL

        Try to use PastWeek  function inside RSUM like this:

        RSUM(PastWeek([Total Sales Value]))