Forum Discussion

BharatKankate's avatar
BharatKankate
Cloud Apps
03-03-2025

How to get sum (sales) till last week?

I have one scenario,

where I have to calculate sum(sale) start to till date---which I am able to get.

but I also want sum(sales) from start to last week (Means start to today -7 days), That I am unable to get.

Highly appreciate response on this.

 

4 Replies

  • harikm007's avatar
    harikm007
    Data Warehouse

    Hi BharatKankate ,

    Try the below approach:

    Add a widget filter to the date field. In the filter popup, set 'Day' as level and add the below custom jaql (assuming the start date is within the last 99999999 days)

    {
      "last": {
        "count": 99999999,
        "offset": 7
      }
    }

     

    -Hari

     

  • Hi BharatKankate,

    Thank you for reaching out. I want to make sure I understand the ask here. Are you wanted a total, but exclude the previous 7 days of data, or do you want the total as of the end of the previous week?