Hi, sorry I know the tittle can seem repetitive, and probably wrongly spelled.
I hope someone could help me with this conundrum.
I have this 3 tables one where i register tires, another with trucks and lastlty another where people register tyre movements and it references the other 2.
Tyre table
[Tyre ID]
Truck table
[Truck ID]
Activity table
[Act ID]
[Date]
[Truck ref]
[Position]
[Tyre ref
report table
[Report ID]
[Report date]
[Act Ids list]
So, I want to pull a list of [Acti ID] without repeating [Tyre ref] values (unique values), and those records should be the latest by [Date] in that specific [Tyre ref], and the date should be lower than [Report date] specifyed in reports table.
Truck can be repeated since each truck has 4 tires, and [Position] is a numeric value from 1-4.
if understanding of your requirement is correct, please create a slice called say “Latest_Tyre_Activity” with a slice filter expression something like
Sorry I wrote this on midnight, forgot to add the part of a fourth table reports. That [Act Id] list sould be also lower than a date specified in Reports table, so that list ahold be a value in column [Act ids list].
Although your answer does work in case I don’t have the date in reports.
The reports table is used to trigger an automation bot who produces a report (pdf or xlsx) based on what kind of report they chose.
In this case the tires report filters the list of activities that were made before the date introduced and by the use and unique [tyre id], this [Act ids list] would be used in the report in a <<START: >><> expression as keys.
Ok, so in this case the Reports table is not directly related to any table in the app, is used for making reports of any kind, it just generates them and the user can introduce in a date column an specific date to filter the information that the report will contain.
Whenever a record is created, a bot triggers, to create a .xlsx file with a report of the activities, that were made prior to the date inputed by the user in a [Report_date].
For example i got this result whitout using this formula
I believe you will need modification in the expression based on which record of the Report table is used. If you respond to new queries, we could help you with the expression.
Yes, the reports table can have multiple rows, its just a table to store the reports. take for example the next screenshot, its a table report from another app.:
It just stores the file, and data of whom solicited, the report, what kind of report, and a date to filter the data. And as you can see any user can come and generate a report with diferent parameters.
This expresion could work, but how does [_THISROW].[ [Report_date],[Tyre Ref]=[_THISROW].[Tyre ref] helps to get a unique value? I don’t undesrtand how that works.
So the expression basically checks if the [Act ID] matches with the [Act ID] computed by right side of the equality operator and selects that record in the slice.