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)),
')'
)
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.
How can I solve this?
Regards,
Maksym
Solved! Go to 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
@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
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |