# Filters for Formula Columns

**URL:** <https://community.omni.co/t/filters-for-formula-columns/290>\
**Category:** Workbooks\
**Tags:** filtering\
**Created:** [March 28, 2025, 4:34pm UTC](https://community.omni.co/t/filters-for-formula-columns/290 "2025-03-28T16:34:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fern](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@fern](https://community.omni.co/u/fern)\
**Post date:** [March 28, 2025, 4:34pm UTC](https://community.omni.co/t/filters-for-formula-columns/290/1 "2025-03-28T16:34:01Z")

</div>

I have a simple table where:

- Column A represents the date companies were added.
- Column B shows the number of companies added that date.
- Column C calculates the 7-day moving average using a formula.

 ![Screenshot 2025-03-28 at 9.33.14 AM](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/94d61147f92edb308a379714df3f1c3a823683b5.png)

Is there a way to apply a filter to adjust the number of days in the moving average? Ideally, dashboard users should be able to switch between different periods, especially when this is visualized as a chart on a dashboard.

---

<div class="post-metadata">

**Author:** ![James](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@James](https://community.omni.co/u/James)\
**Post date:** [March 31, 2025, 5:00pm UTC](https://community.omni.co/t/filters-for-formula-columns/290/2 "2025-03-31T17:00:12Z")

</div>

Hi Fern!

For this scenario I would recommend creating new calcs for the other date periods you want to show the moving average for, and then using a field control to swap out which date period is visible. You would probably also want to hide the extra fields so the vis doesn’t display all moving average calcs at once.

> **[Dashboards | Omni Analytics Documentation](https://docs.omni.co/docs/visualization-and-dashboards/dashboards#field-controls)**
>
> Use dashboards to display and organize your workbook queries.

> **[Table Visualizations | Omni Analytics Documentation](https://docs.omni.co/docs/visualization-and-dashboards/visualization-types/tables#show--hide-columns)**
>
> Omni offers many ways to configure tables for more visual sharing, including layout controls, in-line visualization, conditional formatting, and other controls. It’s important to call out that this is a separate visualization from the results table....
