# Charts with fixed Average Line that's not affected by Dashboard Filters

**URL:** <https://community.holistics.io/t/charts-with-fixed-average-line-thats-not-affected-by-dashboard-filters/2001>\
**Category:** Tips and Showcases\
**Created:** [July 19, 2024, 9:40am UTC](https://community.holistics.io/t/charts-with-fixed-average-line-thats-not-affected-by-dashboard-filters/2001 "2024-07-19T09:40:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhthanh3145](https://community.holistics.io/user_avatar/community.holistics.io/minhthanh3145/32/816_2.png) [@minhthanh3145](https://community.holistics.io/u/minhthanh3145)\
**Post date:** [July 19, 2024, 9:40am UTC](https://community.holistics.io/t/charts-with-fixed-average-line-thats-not-affected-by-dashboard-filters/2001/1 "2024-07-19T09:40:48Z")

</div>

Howdy everyone! 👋

## **Use Case**

Suppose you have a chart that shows monthly signups. You want to see a reference line that represents the average monthly signups of all time. When changing dashboard filters, you don’t want this reference line to be affected, so that you can always compare data against a global average number.

## **How might we solve this?**

- 🛠 **Approach 1: Reference Line**. Currently this can’t be achieved using just the [Reference Line feature](https://docs-v3.holistics.io/docs/charts/reference-line). We’ll overcome this limitation soon so that you can achieve this use case easily.
- ✅ **Approach 2: AQL metric using the `of_all` function** : In the mean time, you can write an AQL metric that’s not affected by dashboard filters, and turn it into a line.

More on this below.

## 🛠 Approach 1: Reference Line (will be affected by filters)

When you create a viz with a reference line using the [Reference Line feature](https://docs-v3.holistics.io/docs/charts/reference-line), and change the timeframe from “6 month” to “12 month”, the reference line is affected by that filter, and also any dashboard filter that links to this chart.

 ![](https://community.holistics.io/uploads/default/original/2X/b/b76cb4ae9d3f0c24a0b82ac7430be1bfb751b520.jpeg)

## ✅ Approach 2: AQL metric using the `of_all` function (unaffected by filters)

The trick is to use a Combination Chart, then define the average total signups using AQL like this:

 ![](https://community.holistics.io/uploads/default/original/2X/2/229a9d3bbdcd667a2c392a99d7c892183ddaf985.png)  
The result will look like this: the reference line isn’t affected by filters.

 ![](https://community.holistics.io/uploads/default/original/2X/9/95919b11fcb3dda58c260bcc6fd7e90e8fb6db4c.jpeg)  
**Why it works?** 👉The `of_all` function is used to specify the grain at which you want to calculate the metric. This will make the metric calculation independent from dashboard filters.

**Prefer a more interactive explanation**?

I’ve recorded a short video explaining this approach here:
