I am trying to shift the start date of the transactional (don't know if thats a word) week from sunday (index 0) to friday (index 6). This is the only view in any of our data models that would use this transnational week. I am creating a 2 new dimensions in the specific view this report is generated from. It is for a week over week report so there would have to be a transaction week associated with it, but even though the week would start friday, the transaction week would have to be read as the next week. (example start Friday 10/25, but transaction week is still read as 10/28).
I have tried to create two new dimensions and even had multiple extensive conversations with looker support and we couldn't come to a feasible solution.
[![dimension: friday_start {
type: number
sql: case when ${transaction_datetime_day_of_week} = 'Friday' then 1
when ${transaction_datetime_day_of_week} = 'Saturday' then 2
when ${transaction_datetime_day_of_week} = 'Sunday' then 3
when ${transaction_datetime_day_of_week} = 'Monday' then 4
when ${transaction_datetime_day_of_week} = 'Tuesday' then 5
when ${transaction_datetime_day_of_week} = 'Wednesday' then 6
when ${transaction_datetime_day_of_week} = 'Thursday' then 7
else null end;;
}
dimension: friday_week_start {
sql: ${transaction_datetime_raw};;
type: date_day_of_week
order_by_field: friday_start
convert_tz: no
}][1]][1]
The dimension works, but it aggregates the total sum of transactions for friday-thursdays, which could be useful in future predictions and modeling, but that's not the point.