How to get this list of items out of two tables

I have a table with all different machines in.
table Machines

  • Serial number
  • Machine Type

I have a table with my Rentals agenda.
Table Rental Agenda

  • Start Rental (date)
  • Stop Rental (date)
  • serial number

this table contains all machines that are not available โ€ฆ if you can not find it in this table it means that the machine is available at that specific moment.

i want to make a search table โ€ฆ
with the following fields
Table Lookup

-Machine Type
-Start Date
-Stop Date

The user can make his selection of those three and then the formula looks up if there are machines available.
this search table has a virtual column where this formula is inโ€ฆ

Any idea on how to set this formula up ? thanks

things i have triedโ€ฆ

formula below gives me all machine that are not available in that time i guess when looking at the selected start & stop date compared to the existing Start and stop Rentals

select(Rental Agenda[serial number],and([Start Rental] <[_THISROW].[Start Date], [Start Rental] <[_THISROW].[Stop Date]))

select(Rental Agenda[serial number],and([Stop Rental] > [_THISROW].[Start Date], [Stop Rental] >[_THISROW].[StopDate]))

is that correct ?
i took the inverse of what i should have so these should be a list of not available machines as they come out of the agenda table

can you some how join to list without making doubles ?
This is still a list of all machine type togethers can i add this somehow in this formula so it is only giving the not available machines from a certain machine type ?

and can i than subtract those serials from the list of total machines so i get the available machines โ€ฆ

all help is more than welcome because i have no clue how to get there โ€ฆ
thanks

Solved Solved
0 5 399
1 ACCEPTED SOLUTION

Likeโ€ฆ SELECT(Machines[Serial Number],[Machine Type]=โ€œDrillโ€) - SELECT(โ€ฆ)

View solution in original post

5 REPLIES 5

How aboutโ€ฆ Machines[Serial Number] - SELECT(Rental Agenda[serial number],AND([_THISROW].[Stop Date]>=[Start Rental],[_THISROW].[Start Date]<=[Stop Rental]))

Hi Aleksi, thanks

this is already helping a lotโ€ฆ
any idea on how to add the machine type filter as well on it ?

Likeโ€ฆ SELECT(Machines[Serial Number],[Machine Type]=โ€œDrillโ€) - SELECT(โ€ฆ)

thanks, that did the job

Youโ€™re welcome

Top Labels in this Space