Forum Discussion
Creating a Calculated Date Table and Sum Over Date Range
- Anonymous8 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
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
Xiaoxin,
It worked!!!
Thank you so much for the help. Brilliantly done.
-Marshall