How can I achieve this in Looker Studio's calculated field?
For instance, if my date range spans from October 30 to November 05, with the week beginning (WB) date set as October 30 (as it is a Monday), it should yield the result "November."
This outcome is desired because, among the dates in the given week (Oct 30 to Nov 05), there are only two dates (Oct 30 and 31) that fall within October, while the remaining dates belong to November.
In summary, the result should reflect the dominant month if the week's date range contains more dates pertaining to one particular month.
Date WB Monday | Result |
---|---|
Oct 30, 2023 | November |
Nov 06, 2023 | November |