WEBi Date Variable - webi

I have a column with various dates and I need to only show data 3 days from current date - I've been able to show the date from 3 days ago but not able to link it to the column date. Any ideas how I can get around this.

If I am understanding correctly you want a way to filter down to the last three days. You cannot compare two objects in a filter. So you need to create a variable to see if the date is within the last three days and then filter on that.
I will show two approaches. First I need a Three Days Ago variable...
=RelativeDate(CurrentDate(); -3; DayPeriod)
I then can use that to create Date Difference...
=DaysBetween([Three Days Ago]; [Full Date])
And then Within Last Three Days...
=If([Date Difference] >= 0; 1; 0)
You can the filter on either of them to get what I think you want.

Related

Is there a way to find the time between 2 dates after subtracting in excel?

I am given this task to complete
"What is the average time for a project to go to 3-Offered per year for the years 2016, 2017, and 2018? Use the formula # Days = [Date Offered] - [Start Date].
Only projects where [Project Template] = "Pre-Approval" will have an offered date, no need to include Fast Track projects in the data."
my current function I am trying to use is
=AVERAGE(IF((B:B="Pre-Approval")*(C:C="3-Offered")*(YEAR(D:D)=2016),E:E-D:D)) but I am getting the #VALUE! and I'm not sure why.
I will link a screenshot of some of the data used for this task.
[Column D is the start date and Column E is the Offered Date]
I think it is easier if you break down the problem into smaller pieces.
First, I would separate the years from the offered date. On a different column, e.g. Year, I would apply =YEAR() for every item in your Offered Date column.
Second, I would take another column, call it Diff, and apply =OfferedDate-StartDate.
Then, for each individual year I would apply =AVERAGEIFS(diff_column_range, year_column_range, "3-Offered", year_column, required_year)
I have an example for you here: https://1drv.ms/x/s!AhMbe-MPmuFCggjutWepn-QtMri4?e=CxpTCW
Let me know if this works for you.
Cheers!

Get sum of cells containing "Vacation" except when related date matches certain day & month

oversimplified i have two columns: Date and Text; I want to check my current amount of vacation days based on the first date in row 2, so i came up with the following formula:
="Available vacation days: "&YEARFRAC(A2;TODAY())*12*(25/12)
I calculate the fraction of the year based on the first date and todays date, multiply it by 12 to get months and multiply it again by the total amount of vacation days in my contract per month. Now i got another formula to collect me all cells in column B containing "Vacation", pretty straight forward:
=COUNTIF(B:B;"Vacation")
Now the interesting part - i got the formula who gives me a boolean if a datetime matches the 24th or 31st of december:
=AND(OR(DAY(A53)=24;DAY(A53)=31);MONTH(A53)=12)
I want to count vacation days happening on a 24th or 31st of december as a half-vacation day (0.5), and otherwise fully (as a 1). Then i want to combine my first statement with this result and subtract the used vacation days. I read about VLOOKUP and XLOOKUP but am unsure if this fits this purpose. I want to avoid having an extra column with my boolean returns and rather have this one cell giving me all the information combined.
Without introducing another column, and using DAY and MONTH
It's nearly impossible, and just unnecessarily so...
Please reconsider this, what will happen if you want to add 4th of July as a holiday?
Your formula =AND(OR(DAY(A53)=24;DAY(A53)=31);MONTH(A53)=12) only works for 1 row at a time. So, we can't ever use it with a list, because you will get the whole list as a result every single time. You can't divide them into smaller lists and join them together, there is no such functionality without VBA.
In the future, do not set arbitrary constraints like "no additional columns", you can hide them if you don't like them. And if you don't need them, remove unnecessary rows like non-vacation rows. They are irrelevant, so why not separate the two.
Just to prove my point, here's the solution you wanted:
Solution
=COUNTIFS(B2:B9;"Vacation") - (COUNT(IFERROR(FILTER(FILTER(FILTER(A2:A9;B2:B9="Vacation");MONTH(FILTER(A2:A9;B2:B9="Vacation"))=12);DAY(FILTER(FILTER(A2:A9;B2:B9="Vacation");MONTH(FILTER(A2:A9;B2:B9="Vacation"))=12))=31);0))+(COUNT(IFERROR(FILTER(FILTER(FILTER(A2:A9;B2:B9="Vacation");MONTH(FILTER(A2:A9;B2:B9="Vacation"))=12);DAY(FILTER(FILTER(A2:A9;B2:B9="Vacation");MONTH(FILTER(A2:A9;B2:B9="Vacation"))=12))=24);0))))*0,5
It works, but it's a pain to read, use and maintain.
A2:A9 refers to the dates column
B2:B9 refers to the text column
So in the future, the last thing you want to do is set arbitrary constraints. Furthermore, why use functions like MONTH and DAY when we can just read the text? That way you could even create a table of holidays to search for instead. That will be no fun task with this setup. (Oh, and if it's because of the year, just strip it away from the text when you want to know only the month and day.
Best of luck!

Power Automate: Send reminder out 3 months in advance

I have a Microsoft List that has a column called Expiration Date (text in format of MM/DD/YYYY) and Point of Contact (text in format of email#domain.com). How do I create a flow that sends an email out to the Point of Contact 3 months in advance?
My idea was to create a scheduled cloud flow that:
Repeats every day
Looks at every row in specific list
Compares if Expiration Date - 3 Months = Today
If True, send email to Point of Contact
I am currently stuck on step 3 to compare the date. I did Subtract from time to subtract 3 months from Expiration Date but now I do not know how to use this value to compare to today's date.
A better approach is to filter the list by using an OData filter. That will result in a list with all the elements you need.
For doing so, you need to specify the "Filter Query" field (in red):
First type
ExpirationDate eq ''
Then, between the quotes, add an expression, and select the functions addDays and utcNow in the following way:
addDays(utcNow(),92,'MM/dd/yyyy')
Please notice the following:
I'm adding 92 days to get the same day three months in advance for today (today is Oct 18th, so I'm looking for Jan 18th). Maybe adding just 90 days would work for you.
If you just want to add 3 to the month, you would need to get today's date to a variable with utcNow('MM') to get only the month, add 3 to it, and then create the expression accordingly.
I'm sorry the UI is in spanish. I'm from Mexico. But it's the same idea.
In the image, it reads "ExpirationDateText" because that's the way I named the field in my example. In your case, "ExpirationDate" should work.

Countif a number have days have passed since date

I need to create an analysis for work in Excel, one of the things that have been asked is that I include a chart, this chart needs to show data grouped by a state given to it and a number of days passed since the date it was created.
I need to count how many of these bits of data there are that are older than 1 day, older than 2 days and so on, I have been looking at some way to combine COUNTIF/COUNTIFS and TODAY()-Date named in cell, this hasn't been fruitful, I am aware that I would just do the TODAY() bit in some seperate cells and work with the data from the but I would prefer a way to do it all in one, if there is some way to do such a thing in one formula it would be great, if not I'll just have to tell my boss no can do.
Thanks in advance for any help given, even if it is telling me it's not possible.
=CountIfs(state, inputState, date, "<"&Today()-1, date, ">="&Today()-2)
That will give you all items holding state from the day before yesterday.
state and date are from your data. Replace with column references or (better) named range names.
Use < and >=, or <= and >, when slicing data by date (or any numeric amount). Using < and > or <= and >= forces you to think hard about gaps or overlap and that's no fun.
Another method would be to use SUMPRODUCT to count the number of occurrences:
=SUMPRODUCT(--(A1:A20>=TODAY()-2))
The number 2 can be increased or decreased to vary the length of time from TODAY(). The >= symbols can also be changed based on whether you would like to count the number of dates before or after TODAY()-2.

What is wrong with this calculated field for total hours between two times in SharePoint 2007?

I am attempting to get the total hours between two times in a SharePoint 2007 list. Right now I have the formula as...
=INT(([Column2]-[Column1])*24)
...which I have looked up and says that it is the correct formula to do this. But, what I get is a weird date like "2/18/1900 12:00 AM" instead of what it should be: 26.
Another formula I tried was...
=TEXT([Column2]-[Column1],"h")
...but, this will only get the difference in hours and not count the days (if they are more than one apart).
Both of the columns are Date & Time columns. So, what am I doing wrong?
My take is that you set the output format of the calculated column to be Date and Time, while it should be of type number.
In a calculated column, the number of hours between two times is:
=TEXT([Column2]-[Column1],"h")
Providing that the difference is less than 24 hours. Otherwise, you'll need to look at getting the days difference and doing a multi-step calculation involving the number of days between the dates * 24 + the calc above.

Resources