Forum Discussion
Dynamic Grouping of Dates
Thank you so much Anonymous
We are almost there but I'am getting something different than I expected. On the top chart I'am having raw data and below is the modified one. So when selecting 07-01-2024, I think it's not grouping but filtering it maybe
So the expected output looking for is:
| 26-11-2023 | 50% |
| 03-12-2023 | 55% |
| 24-12-2023 | 67.5% |
| 07-01-2024 | 40% |
We can see it grouped in 2 weeks bin and taken the average.
- Anonymous2 years agoNot applicable
Hi JunedS
I don't understand the logic of the grouping, Based on your original output, don't you want to implement a return date every 14 days?
Best Regards!
Yolo Zhu
- JunedS2 years agoFrequent Visitor
Hi Anonymous
Let me clarify the logic behind the grouping. Instead of setting a return date every 14 days from the selected date, the idea is to group the dates into bins of two weeks each based on the chosen date in the slicer. This means we're organizing the dates into two-week intervals, but we're not directly grouping the selected date itself.Imagine the user selects a date in the slicer, and let's use January 7th, 2024, as an example. With the grouping logic based on two-week bins, it might look like this:
- Group 1: January 7th 2024 (Selected date) 40%
- Group 2: December 24th 2023 - December 31st 2023 , the average CTSP 67.5%
- Group 3: December 3rd 2023 - December 17th 2023, the average CTSP 55%
- Group 4: 26th Nov 2023, this is the last one left out so only one in the group with CTSP 50%
In this case, the selected date (January 7th) falls within its own group, and the surrounding two-week periods are organized accordingly.