0

On my list, I have a column called 'Month' and another calculated column called 'current month' which obviously shows current month.

How can I adjust the views, so that I can only show the Month = current month

Thank you!

  • You can go in to 'Modify View' and apply a Filter. Select the 'Current Month' field and set it to filter on a value. Are your values months, like October, November...? Or do you have actual dates in another format e.g. 01/11/2017 ? This will affect how you go about filtering your data. – Tally Oct 10 '17 at 15:09
  • There is a drop down list for 'Month' and 'Year' so they will be values. So are you saying, I have to set this every month? – Dingo Oct 10 '17 at 15:13
1

You can create two calculated columns to get the start date and end date of the month of the date column. Then check if the start date of the month of the date value is less than or equal to the current date [Today] and end date of the month of the date column is greater than or equal to the current date [Today]. If yes, it is in the current month.

  1. Create two calculated columns named "Start of Month" and "End of Month". Return as the Date and Time data type.
"Start of Month" =DATE(YEAR([date]), MONTH([date]), 1)

"End of Month" =DATE(YEAR([date]), MONTH([date])+1,1)-1
  1. Create/modify a view and add filter as follow: enter image description here
  • Hi, I had this as an option but the user insisted on using the 'month' column they created. Is there any other options? – Dingo Oct 11 '17 at 13:11
1

I can see that this would work, however it would require me to then make changes to my calculation in both the column itself and then in the formula if I needed to update it in the future. I did find, however, that if I just removed the xsl formatting then the field would display correctly. For example, when the custom list form is inserted, the calculated field is added as something like this:

<xsl:value-of select="format-number(@CalculatedField, '$#,##0.00;-$#,##0.00')"/>

If I just remove the formatting as below, it displays just fine:

<xsl:value-of select="@CalculatedField"/>

Perhaps there some issue with the formatting since the calculated field (at least in this case) is already formatted as currency in my SharePoint list.

For More Reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.