Google sheets if date is less than today +30 - date

I have a date field cell (using data validation), I want to turn that cell red (A14) if the date entered is less than 30 days from that date to the date in 30 days time (today()+30).
=if(A14<today()+30, A14>today())
If A14's date is less than the date in 30 days and greater than today's date, then it would fall within the next 30 days. Therefore the cell should turn red.
I tried the above and it doesn't work.
I noticed the date output of the date field was using dashes (01-01-2020) and today() was slashes (01/01/2020), so I formatted the date cell to reflect slashes too, but still it doesn't work.

try simply:
=(A14<TODAY()+30)*(A14>TODAY())

Related

How to show (Blank) when using calculated column and DATEDIF when using Sharepoint

I use below code on a Sharepoint list to calculate banking days but I want it to show (Blank) when there isn't a date in "End Date List", what do I need to change? Today the code shows a number greater than 32k when (Blank).
=IF(ISERROR(DATEDIF([End Date List];TODAY();”d”));””;(DATEDIF([End Date List];TODAY();”d”))+1-INT(DATEDIF([End Date List];TODAY();”d”)/7)*2-IF((WEEKDAY(TODAY())-WEEKDAY([End Date List]))<0;2;0)-IF(OR(AND(WEEKDAY(TODAY())=7;WEEKDAY([End Date List])=7);AND(WEEKDAY(TODAY())=1;WEEKDAY([End Date List])=1));1;0)-IF(AND(WEEKDAY([End Date List])=1;(WEEKDAY(TODAY())-WEEKDAY([End Date List]))>0);1;0)-IF(AND(NOT(WEEKDAY([End Date List])=7);WEEKDAY(TODAY())=7);1;0))
Since Networkdays function don't work in calculated column I have used this but don't understand where I can change so that if the "cell" is blank, the outcome should also be blank.

How to get the next Bi-weekly date based on a given start date and today's date in Google Sheets

I am trying to get bi-weekly dates based on a start date that would then provide the next upcoming date following the 14-day sequence from the start date, to get me the date that comes after today's date.
For example, if the start date is 6/15/2022, I would want the date every 14 days, and using today's date, I want to get the immediate next date that would still follow the 14-day sequence. Using today's date (6/30/2022), the next date I should get is 7/13/2022, which follows the 14-day sequence, since if you do MOD(DateDif(6/15/2022, 7/13/2022, "D"),14), you will get zero.
More Examples
Start Date: 6/15/2022
Today's Date: 6/30/2022
Next Needed Date: 7/13/2022
Today's Date: 7/14/2022
Next Needed Date: 7/27/2022
I only want to show the single next date, so I do not want to use sequence() or transpose() to fill up multiple rows/columns.
Any suggestions would be helpful, thank you.
try:
=B1+(14*ROUNDUP((TODAY()-B1)/14))

Google Sheets: Automatically Increment Date by 1 Month

I am currently using a budget sheet that automatically updates date cells to the next "payment" date for a bill. As an example:
=VALUE("2019-03-08")+14*FLOOR((NOW()-VALUE("2019-03-08"))/14)
The cell starts with a date and it then updates every 14 days to the new date. This shows me a cell that has the date of the biweekly payment that is due. In the above example, the cell shows the value of "2019-03-08" until 2 weeks have passed. Once 14 days have passed, the cell will automatically upload to "2019-03-22". This automation will continue forever in 14-day increments. The date displayed in the cell will always update automatically to the next 14-day date. This helps me display the exact due date of a biweekly payment without updating the cell.
I want to do the same thing for a monthly payment, but using a day count of 30 is not very accurate. Is there a way to modify this method to let me update the date automatically to the 24th of the month, every month, on that day. So I start with 2/24/2019 and when 3/24/2019 hits, the cell updates to that date, and so on. The reason this is not accurate is that the months are not all 30 day periods. February is 28 days and some are 31 days. I want the cell to increment in 1 month periods in the same way that the above formula updates in 14-day increments. As an example: The date will display "2/24/2019" until the same day on the next month occurs, then the cell will update to "3/24/2019". This process will continue forever with 4/24/2019, 5/24/2019, etc. It will continue with the year as well, so 12/24/2019 will change automatically to 01/24/2020.
UPDATE: Updated the description with examples of how the behavior works and what I am looking for...
It's much simpler than this. Use the EDATE function (e.g.):
=EDATE(A1,1)
Where A1 is your starting date and 1 is the number of months you which to increment by. See https://support.google.com/docs/answer/3092974?hl=en for more details.
this formula will increase the month every 24th and accounts for year change as well
=IF(DAY(TODAY())>=24,
DATE(YEAR(TODAY()), MONTH(TODAY())+1, 24),
DATE(YEAR(TODAY()), MONTH(TODAY()), 24))
paste where you need and drag down:
=VALUE("2019-"&ROW(A3)&"-08")+14*FLOOR((NOW()-VALUE("2019-"&ROW(A3)&"-08"))/14)

Tableau, Week to Date, Month To Date, Year to Date parameter

I have a data set spanning 2 years and is updated daily, created a dashboard to give a view of incidents by date group. I have created a parameter using date trunc for Day/Week/Month/Quarter/Year. This is in Tableau.
I am trying to get the parameter to show a Week to date, Month to date and so on view. IE if on Weds 15th Dec I selected the weekly view, it would only show data for every week in the data set for Sat-Weds (My weeks go Sat-Fri) or the monthly view every month between 1st-15th
Ideally I am wanting this as a simple parameter for a drop down menu, I can do the week to date stuff as a rolling sum restarting every week in a separate table, but for ease I just need a date group function that will allow to do this.
Any suggestions would be appreciated.
Cheers
Pete
The solution is 5 parts:
Date Part Parameter
Max date [Max Date]
Dynamic date part of the Max date [Dynamic Date Part Max]
Dynamic date part of the historical dates [Dynamic Date Part]
Filter those date parts <= the Max date [Dynamic Date - Lass than Max]
Date Part Parameter
Max Date
This is the calculation you'd use with your dataset to find the max date.
{ MAX([Order Date]) }
In order to create a good example, I'm going to set my Max date to a specific date the falls in the middle of a week, in the middle of a month and middle of the year. I'm going use June 13th, 2018 as my Max Date.
So, if you want to follow along you can use the below date as your max date. You can also use this data set if you'd like.
DATE(#2018-06-13#)
Dynamic date part of the Max date
DATEPART([Select Date Part], [Max Date])
Dynamic date part of the Historical dates
DATEPART([Select Date Part], [Order Date])
Filter on Historical dates parts <= the Max Date
[Dynamic Date Part] <= [Dynamic Date Part Max]
Now that we have all the pieces we need let's check to make sure they are working as we would expect.
Looks like we're seeing all the days of the month that are <= the 13th.
When we change it to Day of the Week we see only the days of the week <= the 4th day of the week which is Wednesday when the week starts on Saturday.
Now let's calculate the running sum of sales along our dynamic date part to better help you with your example.
Drag the measure you want to calculate the running sum onto the label, then create a quick table calculation. We'll next need to edit this table calculation as so.
You'll then see your calculation working as you would expect.
Hope this was helpful. Happy vizzing!

Tableau: time series chart displaying last day of month instead of first

In any time series chart, it looks like Tableau defaults to the first day of the month on the tick marks.
Is there a way for Tableau to show the last day of the month instead?
You can sort of force it by going into "Edit Axis", starting it on a month end, and 1 as the monthly interval. However, this is not a dynamic process and would require that I update this every time I had new data.
Anyone have any ideas? Thank you!
If in your data series you want each data point to represent the whole month, and you just want to label it with the last date of that month, then this workaround might work:
use calculated field to coerce all dates in the month to the last date of that month: DATEADD('day',-1,DATEADD('month',1,DATETRUNC('month',[Order Date])))
use this field as date in your time series
use 'More -> Custom -> Month / Day /Year' as display option for this field