Enter Text Based On Date - ms-access-2013

I have a query that populates the next recertification date based on the last recertification date. What I would like to do is if the next recertification date is less than today, then "Past Due" is entered as a value in another field, but if it's greater than or equal to today, then "Certified". Any suggestions?

Status_Cert: IIf([PreviousRecert]+[RecertifyIndays]<=Date(),"Past Due",IIf([PreviousRecert] Is Null,"No Data","Current"))

Related

cypress selecting dates from react-calendar

So I have this annoying issue with the date picker from react-calendar. So the current date is 28th December 2021. I want to select a date in 4 days time.
I first have a month comparitor that checks whether the month is next month. In this case it is, so it will use the skip button to select the next month. January is now shown.
I now want to select the the 3rd of January, but it would select February instead
cy.get('.react-calendar__month-view__days >')
.not('[disabled]')
.each((elem) => {
if (elem.text() === nextDate.toString()) {
elem.click();
}
});
Using the above code block it goes through each element text (which is date number) and then selects the matching number. But when it comes to having 2 of the same number displayed it fails to select the right date and chooses the following month's date
Has anyone come across a similar problem? thanks
Closing this, I should have really saw the CSS. Theres a aria-label="13 January 2022" in the selector, so I can just pass the date I want to select.
cy.get(`[aria-label="${nextDate}"]`).click()

DAX - Month Name column error when dropped in value field

I have a simple date table (marked as a Date Table)
the Date column is native to it, the rest are calculated columns.
This issue will be about these of them:
Month Name = FORMAT(Dates[Date], "Mmmm")
Month = Month(Dates[Date])
Both set to "Don't summarize".
I dropped them into value field of a visual out of curiousity, and a curious thing happened - despite "don't summarize" they took MIN form of value to display, but Month Name came out incorrect.
Image 1: 3 out of 4 lines in the column First Month Name are wrong, unlike Month which is fine.
Image 2: added Date to the row fields to check - line by line it's fine, but subtotal still wrong:
Image 3: I filtered Month Name in data view for February, to see which lines are for Month value of 1 - there is none.
This is a blank new report, no measures, no filters - that's all it is.
If someone can explain why this happens, thanks in advance
The columns with "Earliest"/"First"/"Min" are summarizing because they are implicit measures in a matrix visual. Since there are multiple months in one quarter it has to aggregate somehow.
The month name is a text field, so it sorts alphabetically by default. If you want it to sort by month number instead, you can use the Sort by Column feature to sort Month Name by Month.

Calculating total number of days based on the relative date range filter in tableau

I have a date column using which I created a "relative date" filter as follows:
Now I want to create a measure as follows:
SUM(value from another column)/total number of day in that date range.
Can someone help me how to create this measure?? Thanks!!
Assuming you Record Date field is at the day level of detail, you could do:
SUM(value from another column)/countd(record_date)

How can I dynamically set the time period on a Workflow Time Trigger?

I have a custom object with Start and End date fields, and also a Status field.
When a new record is created, if the Start date specified is in the future, I would like to be able to have a Workflow update the Status field to 'Active' when the Start date is today. However, I only appear to be able to select a fixed number of days after which my Field Update task can be triggered. What I want is to set that number of days equal to Start date - Today's date.
Can this be done?
OK, I realised I can set the time delay to zero days after the Start date. Not intuitive (For me), but it makes sense.

How to calculate date difference with XPath only?

I have a date field in the form created using InfoPath, that allows the users to enter a date, which presumably is the due date of a task. And I want to have another "calculated value" field to:
if the the date has passed, then show "overdue"
if not, then show the number of days left till the given date
Is this possible without writing VB/C# code, but just pasting an expression into the XPath dialog box?
Thanks!
Assuming this is your xml node where user enters date value
<due-date>2012-02-08</due-date>
then below xpath expression will return the days remaining for the due-date if the date entered is before the current-date and returns 'OverDue' if the entered date passes current-date.
if((xs:date(current-date())) <= (xs:date(/due-date)))
then days-from-duration( (xs:date(/due-date)) - (xs:date(current-date())) )
else 'OverDue'

Resources