Establishing Unique Week start dates for different clients.

Hello, I just wanted to confirm my understanding surrounding the week start date and the possible limitations of the Looker platform.

My understanding is that I can set a unique start date per client.

Client A: Observes a week start of Monday.

Client B: Observes a week start of Sunday.

Two completely different clients and organizations opting into to use the Looker reports on my platform. The reason for this is that they need to collect data captured in a “week over week parameter for the last 8 weeks”, running the last complete 7 days does not capture all the data in Client B’s week over week  query. 

What can I do to solve for the these two clients with unique problems surrounding Week Start.

Solved Solved
0 4 1,950
1 ACCEPTED SOLUTION

Hi @Rocky_Olmos,

If they use separate models, you should be able to use the week_start_day parameter in each model. If they are using the same model, you may have to use a conditional to set the week start date in the computation for the period over period analysis. You could use and if statement to shift the day of week index based on a user attribute assigned to each client. 

Please let me know if you have any questions.

Thanks,

Eric

View solution in original post

4 REPLIES 4

Hi @Rocky_Olmos,

If they use separate models, you should be able to use the week_start_day parameter in each model. If they are using the same model, you may have to use a conditional to set the week start date in the computation for the period over period analysis. You could use and if statement to shift the day of week index based on a user attribute assigned to each client. 

Please let me know if you have any questions.

Thanks,

Eric

Hello, 
Excuse me, do you have any example of the conditional you could write in the Looker model ? Thank you !

Hi @Rocky_Olmos,

You could use and if statement to shift the day of week index based on a user attribute assigned to each client. 
 

This was super helpful thank you.

As a follow up, Is there reporting dimensions or measures  enhancements I can make that I might be able to empower my clients within their own organization to freely change the week start date as they deem necessary?

Hi @Rocky_Olmos ,

Would you be able to tell me a bit more about what an enhancement would look like please? Generally, if we want to make something dynamic based on user input, I would suggest leveraging our liquid syntax. We can do a bit more advanced logic in terms of conditionals and variable assignment to adjust certain fields or even queries based on user input. 

Top Labels in this Space