Can we set week start day based on first day of a month?
If current month is Dec 2023 and date 1-Dec-2023 which is on Friday. So I should be able to set “week start day” as Friday which applies to whole analysis.
As per QuickSight if default “start of week” is Sunday and Dec 2023 is month, then weeks for dec 2023 are 3-9 dec, 10-16, 17-23, 24-30 dec.
But I want my week should always be from first day of month, if Dec 2023 is current month and weeks will be 1-7 dec, 8-14 dec, 15-21 dec, 22-28 dec,
and 29-31 dec ( not sure about last week, how that will be achieved. Technically last week should be 29-dec to 4-jan, but we are interested in current month data, 29-31 dec looks ok. )
This will help team to keep track of weekly counts for current month easily.
Is it possible to set “week start day” dynamically?
Welcome to the QuickSight community! Thanks for your question.
You can use calculated fields to adjust the start day of the week. They will all take a similar form, you just adjust the numerical value in the calculation depending on what day you want to start your week.
I have followed the example provided. Implemented with some visuals for 2 month dummy data for month November and December 2023. It is working. Still I am testing with the logic with various visuals before implementing in actual dashboard.
Created KPI, table, bar graph, line chart with filter.
Bar chart or table output is correct. It shows month November weeks then show December weeks with start of respective month which is 1-Nov-2023 and 1-Dec-2023
But in Line chart ( select filter by week ), same formula show output differently. For week filter, X-axis starts with 1-Nov-2023, covers November month’s weeks and when December starts, line chart shows 6-Dec-2023 instead 1-Dec-2023, which is continuation of month November’s weeks like after 29-Nov-2023, next 7 days which is 6-Dec-2023
Does line chart get plotted in this way, then similar should happen for Bar chart or table ?
Can we have same behaviour of bar chart in case of line chart , means on x-axis after 29-Nov-2023 next data point should be 1-Dec-2023 instead 6-Dec-2023?
Hello @rahul.kolage, my apologies for the delayed response! These are some solid calculated fields you have made for this functionality. I know it looks like it isn’t functioning how you expected on the line graph, but it is giving you a data point at the end of your first month week. There are just limitations on how the line graph visual displays because it is developed to display equal partitions on the x-axis. I don’t think you will be able to alter it any further to achieve markers for each week. What you can do though, is alter the visual representation of the line to add more defined points on each of your custom weeks to make it a little easier to read. That can be done in the edit visual section.
Let me know if you have any further questions. Thank you!