Forum Discussion

MBenson415's avatar
MBenson415
Frequent Visitor
8 years ago
Solved

Creating a Calculated Date Table and Sum Over Date Range

Hello,   I have a task list whose rows contain [Start Date] and [End Date], and [Cost].   I am trying to generate a calculated Calendar table that will display the Cost spread over the length of ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi MBenson415,

     

    For this situation, records table contains the date range based on start date and end date, it is hard to create relationship between these columns.(your calendar date need to mapping to each day of this virtual range not only start date and end date)

    In my opinion, I'd like to recommend your to expand these date range and add column to store detail range date, then use detail date to link calendar table.

     

    Steps:

    1. Enter to query editor add custom column.

     

    2.  Expand list.

     

    3. Create relationship between calendar date and records table.

     

    4. Direct use related columns to create visuals.(you not need to write measures)


    Notice: since the method will expand all the dates, it will generate huge amount of redundant records, it will effect the performance.(on my side original table: 100 rows; after expand: 5096 rows)

     

    You can choose one of them as the solution.

     

    Regards,

    Xiaoxin Sheng