How to create a current week view in Microsoft Lists

Creating views in Microsoft Lists is a straightforward process and it can be done using the UI to apply filters, group elements or even order the items as you wish. Despite the simplicity you can go a step further and use expressions and functions to display your data in different formats and create advanced views.

In this article you will learn how to create a view to filter the items created in the current week from Monday to Sunday.

Week View Microsoft Lists

To implement this solution, you’ll need to use calculated columns and functions, if you are not familiar with the concept you can learn more about it here.

How to create week columns in Microsoft Lists

The first step is to create 3 new columns:

  • Week start – The initial day of week when the item was created
  • Week end – The final day of the week when the item was created
  • Week day – This one is option and will be used to easily show the day of the week when the item was created.

To create the new columns, you will need to do the following process 3 times one for each column:

  1. On your lists in Microsoft Lists click in the Add Column option and then in the drop down select More… At the time of writing calculated columns are only available in the classic SharePoint interface.
    Week View Microsoft Lists
  2. Provide a name for the column
  3. In the type of column select Calculated (calculation based on other columns)
  4. The next step is defining the formula that will calculate the dates based in the created column that exists by default in the list. The list below has the formulas and the return data type you should select for each one of the 3 columns. This calculation uses the WEEKDAY function and you can learn more about it here.
    • Week start
      • Formula: =Created-(WEEKDAY(Created,3))
      • Data Type: Date and Time with Date Only format
    • Week end
      • Formula: =Created+(6-WEEKDAY(Created,3))
      • Data Type: Date and Time with Date Only format
    • Week day
      • Formula: =WEEKDAY(Created,3)
      • Data Type: Number

    Week View Microsoft Lists

  1. Click OK to add the column to the view

Once you complete this process for each one of the columns you should get something like what is illustrated in the following picture with the 3 new columns added to the end of the lists.

Week View Microsoft Lists

How to create a list view for the current week

Now that you got all the columns needed added to the list it is time to create the view that will filter the items that were created in the current week, to implement it you should do the following:

  1. From the list in Microsoft Lists click in the cog icon and then click in the List Settings option
    Week View Microsoft Lists
  2. Scroll down to the bottom of the page and click Create View
    Week View Microsoft Lists
  3. From the list of available options click on Standard View
  4. Provide a name for the view
  5. Select the columns you would like to display
  6. Expand the Filter section
  7. Select the option Show items only when the following is true
  8. Build the condition as shown in the following image

    Week Start is lee than or equal to [Today] AND Week End is greater than or equal to [Today]

    Week View Microsoft Lists

    The [Today] syntax is used to filter a column based on the current day

  1. Click OK to save it

Your newly created view should now filter all the items created in the current week, to start using it you just need to choose it from the view selector dropdown.

Week View Microsoft Lists

As you can see the in the above picture the new view is not showing the beginning and the end of the week as that information is only needed to apply the filter. It is showing the weekday when it was created, but with a number and not as string.

How to format weekdays using column formatting in Microsoft Lists

The WEEKDAY function used in the weekday calculated column returns the day of the week between 0 and 6, despite the unfriendly format you will be able to modify it using Microsoft Lists column formatting by doing the following:

  1. With the new view selected click in the dropdown icon in the weekday column
  2. Expand the Column settings
  3. Click in the Format this column option
    Week View Microsoft Lists
  4. From the format column side panel click in the Advanced mode
  5. In the text box paste the following JSON code
  6. {
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "txtContent": "=if(@currentField == 0, 'Monday', if(@currentField == 1, 'Tuesday', if(@currentField == 2, 'Wednesday', if(@currentField == 3, 'Thursday', if(@currentField == 4, 'Friday', if(@currentField == 5, 'Saturday', if(@currentField == 6, 'Sunday','')))))))"
    }

    Week View Microsoft Lists

  1. Click Save

With the current week view created and the weekday column formatted you will get a result similar to what is shown in the following image.

Week View Microsoft Lists

If you would like to implement this solution for a different date range or to start your week on a Sunday let me know in the comment section and I’ll help you out building the formulas and the formatting for that.

 


11 Responses to “How to create a current week view in Microsoft Lists”

  1. Matt

    February 1, 2023

    Hi. Thanks heaps for this post. I’ve been adding this to lots of my stuff. Is it possible to creat a link that would direct a user to this particular view straight away?

    Reply
    • João Ferreira

      March 23, 2023

      Hi Matt,

      I’m not sure if I understood correctly your question but you can define the week view as the default view for your list.
      Alternatively you can grab the view link to make it available in your intranet so users open directly the desired view.

      Hope this helps, have a nice day

      Reply
      • Matt

        April 6, 2023

        That is exactly what I did – grabbed the link, inserted the %20 for spaces between the words in the link name and it works! Thanks heaps for your help and all the fantastic ideas you share with us!

        Reply
  2. Itzael Alvarez

    March 21, 2023

    Hi Joao, I really like your content! And I would like to ask you if you know the answer obviously I’m having issues this week 3/21/2022 using this filter, it is not showing me in my company SharePoint the items that were created, do you know any workaround? My best regards!

    Reply
    • João Ferreira

      March 23, 2023

      Hi Itzael,

      I also had the same issue in my lists, something must have happened with the WEEKDAY formula.
      To fix it edit each one of the calculated columns, modify the WEEKDAY formula to something like WEEKDAY(Created,2) and Save it.
      Edit each one of the columns again and modify the WEEKDAY formula to the original value WEEKDAY(Created,3) and Save it.

      This should calculate all the dates again.

      Let me know if it worked for you, have a nice day.

      Reply
  3. James

    March 22, 2023

    Hi João,

    I have implemented this view with success on a scheduling list that I created, however it has suddenly stopped displaying items. I have reviewed all of my column calculations, and the filter settings, and all appear to be correct. Is there anything you can think of that would perhaps cause this to stop working?

    Reply
    • João Ferreira

      March 23, 2023

      Hi James,

      I also had the same issue in my lists, something must have happened with the WEEKDAY formula.
      To fix it edit each one of the calculated columns, modify the WEEKDAY formula to something like WEEKDAY(Created,2) and Save it.
      Edit each one of the columns again and modify the WEEKDAY formula to the original value WEEKDAY(Created,3) and Save it.

      This should calculate all the dates again.

      Let me know if it worked for you, have a nice day.

      Reply
  4. Keenan

    September 8, 2023

    Hi João,

    On a traditional SharePoint calendar I can add the following to the calendar URL to show the month of October upon page load, for example: ?CalendarDate=01/10/2023

    Sadly this does not work for Microsoft Lists Calendar. Is there a way to make it so the calendar loads to a specific month rather than current month?

    Reply
    • João Ferreira

      January 29, 2024

      Hi Keenan,

      With the current version of the calendar it will always default to the current month, week or day.

      Have a nice day 🙂

      Reply
  5. Marcella

    November 8, 2023

    Muito obrigada, João. I found this super helpful. I was able to follow the steps. You’re a legend!

    Reply

Leave a Reply


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.