Forum Discussion
Henk50
4 years agoRegular Visitor
Checking if date falls between 2 dates on different table
Hi all, I've found similar topics, but it's hard to applicate this on my case; I have two tables: Table Contracts Supplier Contract version Contract start date ...
- 4 years ago
Hi,
Calculated Column in Invoices table:
Contracted Supplier = VAR InvoiceDate = Invoices[Invoice date] VAR Supplier = Invoices[Supplier] RETURN IF( COUNTROWS( FILTER( Contracts, Contracts[Supplier] = Supplier && Contracts[Contract start date] <= InvoiceDate && Contracts[Contract end date] >= InvoiceDate ) ), "Yes", "No" )Regards
Jos_Woolley
Solution Sage
4 years agoHi,
Calculated Column in Invoices table:
Contracted Supplier =
VAR InvoiceDate = Invoices[Invoice date]
VAR Supplier = Invoices[Supplier]
RETURN
IF(
COUNTROWS(
FILTER(
Contracts,
Contracts[Supplier] = Supplier
&& Contracts[Contract start date] <= InvoiceDate
&& Contracts[Contract end date] >= InvoiceDate
)
),
"Yes",
"No"
)Regards