Validation on range of dates - date

I have a lookup table as follows:
StartDate
EndDate
Name
01/01/2022
31/01/2022
Custom Name 1
01/02/2022
28/02/2022
Custom Name 2
etc.
On another sheet I have a date column and a name column. I want to autopopulate the name from this lookup table based on the date being between one of the start and end dates.
What validation formula do I need to apply to get this to work?

Related

Sisense, display number of days in date filter

Have a date filter on the dashboard that allows for a custom date range:
Dashboard Date Filter
How can I add a the number of days in the filter to a formula? Just trying to show the number of days in column of a pivot table. In this example the date range is 45 days. The dataset doesn't have one record for each day, so a distinct count of days from the data set returns 42.
Is it possible to use the date from and date to filter values in formula? DDIFF([datefilter-from], [datefilter-to])
Extract the date from the fact table and create a dimension table which will contain all the dates.
Link the date column from fact table and dimension table. Use the dimension table's date column in filters.

PostgreSQL filter data based on star date and end date on result column

In above image mon_year column contain month and year data.I have start date and end date and want to filter on mon_year column.
ex.I am selecting start date is 22-06-2017 and end date 20-01-2018.So last two row will not come in result.I am using date_part PostgreSQL function but its not working.
right now I have separate column of month and year.

Calculated field that will get the % total from a specific date to a year back

DataTypes
AffectedDate: Date & Time
RecDate: Date & Time
I have 2 Data Sources i am pulling my data from.
Above is the Data that is being pulled into this report. The AffectedDate comes from the Data source Elliott_QtyOnHand2 and it controls how many years/months are displayed.
I have this calculated field and the amount that shows up is controlled by the RecDate, which is in the Elliott_IssueQty data source.
Right now the Prev Amount Calculated field changes when i put the RecDate in the Filter area because the RecDate dictates how much data is summed in the Sum(Amount) part of the Prev Amount calculated field.
Right now i can put the RecDate in the filter area to show me the sum(Amount) in the Prev Amount calculated field of everything between a range of dates, but i need this to be done on the fly, as each field will be different.
For example if the Affected Date is Jan, 2017 we want the Sum(Amount) in the Prev Amount Calculated field to only sum from Jan, 2016 to Jan, 2017, which again is calculated off of the RecDate
Feb, 2017 would sum(amount) between Feb, 2016 - Feb, 2017 and so on...
Create a calculated field and write below code:
[Order Date] >= MAKEDATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())) AND
[Order Date] < MAKEDATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))
Replace order date with date field in your database.
Place the calcualted field in filter shelf and then select true
Edit--------------------------------------------------------------------
Using filter doesn't help dynamic functionality of your requirement, instead you need to use parameter to achieve this:
Create a parameter select date and then select datatype as date, Here you can manually type values or select any database field using list radio button and display format should be month year from drop down.
Now crate a calculated field and write below code.
[Order Date] >= MAKEDATE(YEAR([Parameter 1])-1,MONTH([Parameter 1]),1)
AND
[Order Date] < MAKEDATE(YEAR([Parameter 1]),MONTH([Parameter 1])+1,1)
//Change order date to your **Rec Date**, if **Rec Date** is `date time` then convert t0 date format, else just replace the order date with **REc date**
Place the created calculated field on filter area and select true
Note: if you are using the datbase filed to populate the parameter values then if any new data additions to database you need to update the parameter manually or just follow method in link
if you need I can share workbook, drop a comment if you have any queries

How to add a integer field to date field in maximo?

I need to add a integer field to the date field then output value should be in date format.
For Eg: frequency is integer field and certdate is date field i wrote a Set Value action in which I need to set the summation of both values to the Nextdate field(Date) and i am using db2.
If having a Value of :certdate + :frequency and a Parameter/Attribute of NEXTDATE isn't working for you, you'll need to revert to an automation script or Java class that uses the Date and Calendar classes to do what you want.

Need to add a Column to signify Active or Termed Status

I am creating a table that has a variety of Employee data in fields. I need to add a column that will display an "Active" or "Termed" status based weather there is a date in the Termination Date column.
For example, If the employee has a date in the StartDate column but not in the EndDate column then the EmpStatus Column will return an "Active" status. If there is a date in the EndDate column then it will return a "Termed" Status.
I am loading a master table from a view is the fastest and easiest way to do it.
The question is, where can I find a script that will perform the function I need.
SELECT CASE WHEN EndDate is not null then 'Termed'
WHEN StartDate is not null then 'Active'
else 'unknown' end as EmpStatus
FROM employee