I want the Week (Date) in my charts to start on Sunday not Monday as it is by default

Greetings.
I need to accomplish that is mentioned in subject.

I have created the calculated field that shows correct dates similar to ISO Year Week data type (that is give by Looker Studio):

CONCAT(
FORMAT_DATETIME("%b %d, %Y",DATETIME_TRUNC(date, WEEK)),
' to ',
FORMAT_DATETIME("%b %d, %Y", DATETIME_ADD(DATETIME_TRUNC(date, WEEK), INTERVAL 6 DAY)),
' (Week ',
WEEK(DATETIME_TRUNC(date, WEEK)),
')'
)

MaksymH_2-1734881744377.png
After that I see that it shows incorrect ordering, so I created another calculated field to accomplish correct sorting (because date I cannot put there, restriction from Looker):

EXTRACT(WEEK FROM (DATETIME_TRUNC(date, WEEK)))

But still even after that I have incorrect sorting output. 

MaksymH_0-1734881714598.png

How can I solve this?

Regards,
Maksym

 

Solved Solved
0 2 1,407
1 ACCEPTED SOLUTION

Greetings @ArkadyZagdan 

The same that is showed upward (extract calculated field). 

The problem was that I have put sum aggregation for that CF, so if the week is not finished generally it has less sum then the previous one. Fixed by using the average aggregation.

Best wishes,

Maksym

 

 

View solution in original post

2 REPLIES 2

@MaksymH can you paste whihc field you are using to sort chart and sort options?

Greetings @ArkadyZagdan 

The same that is showed upward (extract calculated field). 

The problem was that I have put sum aggregation for that CF, so if the week is not finished generally it has less sum then the previous one. Fixed by using the average aggregation.

Best wishes,

Maksym