Show NULL rows in Date Filter
Adding a date filter to a dashboard (including Timebar or Filter Snippet) results in NULL transactions, even when the Max Available Range is used. Users may expect the Max Available Range to include all transactions.
This article explains how to show transactions that have a NULL value in the date field by replacing the NULL value with a future date in a calculated column.
To show NULL rows in Date Filter:
-
Create a Derived Field calculation using the coalesce function to replace the NULL values with a future date.
For example:
coalesce(payment_date, TEXT_TO_TIME('2047-12-31','YYYY-MM-DD'))
Use the new calculated date filter as the timebar or Filter Snippet.
Date Filter Values Override
Note: This feature is optional and requires designer user permissions.
Filter Value Override is used to improve the load performance of the date filter. This is achieved by specifying a min and max date, saving the system effort by collecting this data from the business view.
To override the Date Filter values:
Navigate to Administration → Manage Business Views.
Select the required Business View → Source Creation.
Add a Filter Value Entry.
Provide an Entity Name.
Select the Connection.
Select Custom SQL.
-
Enter UNION ALL SQL where the first union gets the First Date, and the Second Union gets the Max date.
The SQL might change depending on the DB type.
This example is based on Postgres SQL:
select min(payment_date) from iby_payments_all
UNION ALL
select '2047-12-31'::date
Run Apply and Save the changes.
Navigate to the Fields Screen.
Select the date field.
Select the Filter Values menu.
Choose Dynamic Override.
Select the Entity created in step 4.
Select the field and click Save.
Alternatively, you can set the Static date option, but the Maximum date value is limited to 2030.
Hide extra column from The Reports
Note: This feature is optional and requires designer user permissions.
To hide the extra column from the reports:
Navigate to Administration → Manage Business Views.
Select the required Business View → Fields → Update Field Capabilities
Filter the Derived field.
Disable the settings where you do not want the new field to show and leave the Filtering field enabled. .