3 Replies Latest reply on Dec 21, 2018 12:18 AM by Ombir Rathee

    Expanding Days Between Two Dates

    gab t

      Hi all,

      I have been struggling with this problem for quite some time.

      On a basic level, I have a data set that contains date_from, date_to and a cost_per_day.

      I would like to see a line chart of total cost per day.

       

      The challenge is even when i pivot it out, I can get it to work as a count of records - but not as a sum.

       

      I don't want to break it into individual days in the data itself due to size of data - we have around 600,000 rows x number of days in period = astronomically high.

       

      For example, assuming a 2 row data set of:

       

      INPUT

      date fromdate tocost per day
      1/01/20175/01/20174
      3/01/20177/01/2017

      3

       

      ...should convert into a line chart showing:

       

      DESIRED OUTPUT

      datetotal_cost
      1-Jan4
      2-Jan4
      3-Jan7
      4-Jan7
      5-Jan7
      6-Jan3
      7-Jan3

       

      Any help would be greatly appreciated!