> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/self-service-visualization-4/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/self-service-visualization-4/applying-filters/view-specific-filter/date-based-view-filter.md).

# Date-based View Filter

{% hint style="success" %}
*Check out the walk-through on how to filter a View based on Date values.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq1Y2nC9XDrWcLwg1gpYr%2Fuploads%2F09jvHAszBm1sHQ7XCBvZ%2FTime%20Dimension%20Filter%20In%20Between.mp4?alt=media&token=6ed39a24-3e90-4018-a957-22815131e3f3>" %}
***Applying Date-based View Filter (Between)***
{% endembed %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq1Y2nC9XDrWcLwg1gpYr%2Fuploads%2FCPfinKUFFuo87B9nelYu%2FTime%20Dimension%20Filter%20Relative.mp4?alt=media&token=fb84497c-1ac3-49c6-bd68-0680d9a1e684>" %}
***Applying Date-based View Filter (Relative)***
{% endembed %}

The users can apply Date based View Filter by selecting the Date Values from the Data Store. The user can provide two kinds of conditions on the Date values:

1. Between
2. Relative

## **Between** <a href="#between" id="between"></a>

* Avail a ***View*** on the ***Design canvas*** containing the Time dimension.
* Click the ***Filter*** icon on the ***Design*** page.
* The Filter panel opens, displaying all the available filter values.

<figure><img src="https://content.gitbook.com/content/vIDgRfkRB1bQpGtEDFfQ/blobs/qgqMNGWxfnBH7esNjDu2/image.png" alt=""><figcaption></figcaption></figure>

* Select a dimension or measure containing ***Date*** values to filter the View.
* Choose the ***Between*** option from the drop-down menu.
* Provide the ***From*** and ***To*** dates.
* Click the ***Apply*** icon.

&#x20;      ![](https://content.gitbook.com/content/vIDgRfkRB1bQpGtEDFfQ/blobs/XejLWwfFcnROX2qFixBn/image.png)

* The selected view gets filtered as per the applied date filter conditions.

<figure><img src="https://content.gitbook.com/content/vIDgRfkRB1bQpGtEDFfQ/blobs/KkOp7h7V1lHRNQEgvhrr/image.png" alt=""><figcaption></figcaption></figure>

## **Relative** <a href="#relative" id="relative"></a>

* Create a View with the Date Dimension.
* Click the ***Filter*** icon on the ***Design*** page.
* The ***Filter*** panel opens.

<figure><img src="https://content.gitbook.com/content/vIDgRfkRB1bQpGtEDFfQ/blobs/GPErjN2DxfowJ9t3Hkl6/image.png" alt=""><figcaption><p><em><strong>Selecting a Time Dimension from the Filter Panel</strong></em></p></figcaption></figure>

* Select a ***Date*** value as the ***filter condition***.
* Choose the ***Relative*** option from the drop-down.
* Insert a period by selecting the required values.
  * The user gets the ***Last*** and ***This*** under the drop-down menu to select the ***past*** or ***present time zone***.
  * There are ***4 categories of time pointers*** provided in another drop-down menu, which allow the user ***to select a value out of Years/ Months/Weeks/Days***. E.g., the below-given image displays the ***Last 5 years*** as the selected time condition.
* Click the ***Apply*** icon.
* The selected ***View*** gets filtered based on the applied date conditions.

<figure><img src="https://content.gitbook.com/content/vIDgRfkRB1bQpGtEDFfQ/blobs/Jv7v0t3eGraTgPYDwBuo/image.png" alt=""><figcaption><p><em><strong>View Filter based on the Time Dimension with Relative option</strong></em></p></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The same set of steps can be used to apply the **Global filter** based on the date values.​*
{% endhint %}
