QuickSight's Custom Week Start Day Feature and a Custom Script for Analysis Week Start Day or Time Zone Updates

Feature Overview

QuickSight has always been about making data analytics easy and flexible, and now we’re taking that flexibility to a whole new level with the introduction of the Custom Week Start feature. With this exciting addition, QuickSight users can set the start day of the week according to their specific business needs. This feature allows for better alignment with various international and industry-specific date standards. In addition to this feature, we are also excited to introduce a custom Python script that empowers QuickSight users to change the week start day for all their analyses in one account using the QuickSight API. Let’s explore the benefits of both of these tools and how they can enhance your data analytics experience.

Why It Matters

Alignment with International Standards: QuickSight’s new Custom Week Start feature lets you align your analysis with different global practices. Whether your work follows the ISO 8601 standard (Monday as the first day of the week) or a different custom schedule, QuickSight can accommodate your needs.

Industry-Specific Needs: Different industries often have unique calendar conventions. With the Custom Week Start feature, you can ensure your analyses adhere to your industry’s standards. This is particularly valuable for businesses that rely on customized week structures.

How to Use the Custom Week Start Feature

Getting started with the Custom Week Start feature is straightforward:

  1. Open your analysis in QuickSight.
  2. Navigate to the Edit file menu pane.
  3. In the Analysis Settings section under Date and Time, choose the Custom week start day that you want.
  4. Select Apply.

Introducing the Custom Python Script for Analysis Week Start Day Updates

For QuickSight users who manage a significant number of analyses, updating the week start day for each one individually can be time-consuming. To streamline this process, we’ve created a custom Python script that allows you to change the week start day for all your analyses in one account using the QuickSight API.
The script leverages the QuickSight API to automate the update process, saving you time and ensuring consistency across your analyses. You can find the script and usage instructions in our Github repository.

Prerequisites
For this solution, you should have the following prerequisites:

How to Use the Custom Python Script:

  1. Download the Python script to your local machine.

  2. Navigate to the account’s management console and create a new User in IAM.

  3. Attach AdministratorAccess permissions to the user.

  4. After creating, copy down the access key and secret access key.

  5. Next, create a new Role in IAM.

  6. Under Select Trust Entity, select AWS account and This account.

  7. Attach AdministratorAccess permissions to the role.

  8. After creating, copy down the ARN for the role.

  9. Open the UpdateWeekStartAnalysis.py file in an IDE of your choice.

  10. In the file, replace the parameters with yours:

  11. Step 1: NEW_WEEK_START = 'YOUR CUSTOM WEEK START DAY HERE'

  12. Step 2: RoleArn = 'ARN THAT YOU COPIED HERE'

  13. Step 3: region_name = 'YOUR ACCOUNT’S REGION HERE'

  14. Open a new terminal and run the following commands with the keys you copied from above:

  15. export AWS_ACCESS_KEY_ID = EXAMPLEKEY

  16. export AWS_SECRET_ACCESS_KEY = EXAMPLEKEY

  17. export AWS_DEFAULT_REGION = EXAMPLEREGION

  18. Optional: If you also want to update the custom timezone for all your analyses, you can uncomment out line 94 and replace the variable with your desired timezone.

  19. Run the script to update the week start day for all analyses in your account. After the script has finished running, you can find the analysis ids for any failed updates in the terminal.

Conclusion

QuickSight’s Custom Week Start feature is a powerful addition that enhances the flexibility and customization capabilities of the platform. By allowing users to set their preferred start day of the week, QuickSight ensures that your analyses align with your specific needs and standards. For users managing multiple analyses, our Python script simplifies the process, making it a breeze to update the week start day across your entire account using the QuickSight API.
Stay tuned for more exciting updates and features from QuickSight, and don’t forget to check out the QuickSight Community for discussions, tips, and more.

Happy analyzing!

1 Like