Using dolibarr's data to overview rental state

Hi ! I'm trying to implement a sort of minimalistic rental manager with Metabase using Dolibarr's data and almost everything is great, i am struggling however with two things :

  1. i have a list of beer dispensers that we rent all year long for varying periods of time, and a table of orders, each one mentionning a dispenser (and a whole bunch of info : delivery date, return date, keg types, keg quantity etc.).

image

I've managed to display dispensers that are currently gone (by manipulating dates and invoice status) and it shows this:


This is ok but do you see a way to get the opposite list aka dispensers that are NOT called in any order aka the raw list of dispensers minus the list of occupied ones ?


  1. Second thing would be getting this list dynamic base on a dashboard date filter. Right now the way i output this list is by filtering with a "now" variable using :
    case(between(now, [Llx Commande - Rowid → Date Livraison], [Llx Commande Extrafields - Rowid → Dateretour]), "sortie", "pas sortie")
    However i can't know the same info for some future week so i'd like to make this "now" statement referable by my dashboard filter. Is this doable with the query builder or do i have to convert my question to sql in order to use a variable ?

Many thanks !