I am using the below filter formula to filter by conditions.
But if cell A7 is blank I want to ignore the second condition which is Database!D3:D=A7
.
=FILTER({'Database'!C3:F},'Database'!A3:A=R7,'Database!D3:D=A7
Filtering from another sheet on multiple conditions
Here's a formula that can use for both cases :
=FILTER({'Database'!C3:F},
('Database'!A3:A = R7) * IF(A7 = "", 1, 'Database'!D3:D = A7))