Select the last/latest date in a table (rows)

Hi, can anyone help:
I designed an audit app. The table “Audits” contains columns “Site Name”, “Audit Date (Datetime)”, “Location (LatLong)”, “Audit status” etc. With some yes/no questions. The audits are displayed in a map.
Several sites needs to be audited per day. Sometimes one Site needs more audits on one day. I need to report the last/latest audit per site, so not the previous audits at the same day. Only the last/latest audit per site is relevant on that typical day. On maps all the audits are displayed now, but I need only the latest audit displayed on that typical date.
What is the best way to do that? Hope someone can help me.

Solved Solved
0 4 2,831
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Create a slice on the Audits table with a row filter expression like the following, then map the slice.

(
  [_THISROW]
  = MAXROW(
    "Audits",
    "Audit Date (Datetime)",
    ([_THISROW].[Site Name] = [Site Name])
  )
)

See also:



View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

Create a slice on the Audits table with a row filter expression like the following, then map the slice.

(
  [_THISROW]
  = MAXROW(
    "Audits",
    "Audit Date (Datetime)",
    ([_THISROW].[Site Name] = [Site Name])
  )
)

See also:



Thank you so much, it works!

Hi, I have a form with category lookup (list). When you select a category I need to show the selected questions from another table. So when I select Category A, I need to show the questions from Category A in table A. If you select Category B show questions from Table B etc… What is the best way to do that?

Hello,
I am like to select a list of project_nr’s from another table with where the date is latest. So do not show duplicates but only the last date. I try to do that in valid_if and enum but it not seems to work.

Top Labels in this Space