# Is there a way to a calculated field ignore only one filter and consider the others?

**URL:** <https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561>\
**Category:** Q&A\
**Tags:** analysis, filters, calculations, feature-request, quick-sight\
**Created:** [May 11, 2022, 12:50pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561 "2022-05-11T12:50:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![elrafaraujo](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@elrafaraujo](https://community.amazonquick.com/u/elrafaraujo)\
**Post date:** [May 11, 2022, 12:50pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/1 "2022-05-11T12:50:50Z")

</div>

I would like to make a calculated field which is a fixed percentage of itself, aggregated by category AND respect the others filters of date, company and product.

| date | company | category | product | value |
| --- | --- | --- | --- | --- |
| 2022-01 | AA | A | p1 | 10 |
| 2022-01 | AA | A | p4 | 10 |
| 2022-01 | AA | B | p1 | 3 |
| 2022-01 | AA | C | p2 | 23 |
| 2022-01 | BB | A | p1 | 6 |
| 2022-01 | BB | A | p4 | 7 |
| 2022-01 | BB | B | p1 | 11 |
| 2022-01 | BB | C | p2 | 21 |
| 2022-02 | AA | A | p1 | 1 |
| 2022-02 | AA | B | p1 | 5 |
| 2022-02 | AA | C | p2 | 16 |
| 2022-02 | BB | A | p1 | 5 |
| 2022-02 | BB | B | p1 | 9 |

I created the calculated fields:

- value by PRE\_FILTER = sumOver(value, [date], PRE\_FILTER)
- value by PRE\_AGG = sumOver(value, [date], PRE\_AGG)

For example, when I filter company = “AA” in January 2022, _value by PRE\_AGG_ gives me the expected answer of 46. In February also gives me the expected answer of 22. I would like to fix these totals whenever I filter the category at the same time it is dynamicaly filtered by the others filters of date, company and product.

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/a/a76f2f8a5f7dc253379333d73338a5d79dd81777.png)

---

<div class="post-metadata">

**Author:** ![cddesroc](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/cddesroc/32/6717_2.png) [@cddesroc](https://community.amazonquick.com/u/cddesroc)\
**Post date:** [May 27, 2022, 3:13pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/2 "2022-05-27T15:13:21Z")

</div>

I’m sharing your feature request with our product team

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [May 27, 2022, 7:52pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/3 "2022-05-27T19:52:40Z")

</div>

Hi elrafaraujo! I think I have a solution for you if you dont want to display the Category field in your table. The solution will still give you two Value fields - one that is filtered by Category and one that is not (for your denominator I suppose), but it wont show the Category field in the visual (I mean you could keep it there, but when you ‘filter’ by category, all the categories would still be visible).

Let me know if that’s acceptable and Ill share it here.

I guess more generally it would be helpful to understand what the end-state visual should look like.

---

<div class="post-metadata">

**Author:** ![Ying\_Wang](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/ying_wang/32/389_2.png) [@Ying\_Wang](https://community.amazonquick.com/u/Ying_Wang)\
**Post date:** [June 20, 2022, 9:36pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/4 "2022-06-20T21:36:05Z")

</div>

@emilyzhu We might want to consider to support field level filtering.

---

<div class="post-metadata">

**Author:** ![woliveiras](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/woliveiras/32/3080_2.png) [@woliveiras](https://community.amazonquick.com/u/woliveiras)\
**Post date:** [April 14, 2023, 12:28am UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/5 "2023-04-14T00:28:52Z")

</div>

Hi @Jesse, could you show your solution in that case? I have the same problem here. Tks

---

<div class="post-metadata">

**Author:** ![Jesse](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/jesse/32/177_2.png) [@Jesse](https://community.amazonquick.com/u/Jesse)\
**Post date:** [April 17, 2023, 4:28pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/6 "2023-04-17T16:28:40Z")

</div>

It has been a while since I dove deeply into this, but I found the analysis I and @Koushik_Muthanna were testing this out on. Check this out in DemoCentral (can open the Analysis and look at calcs, filters, etc) to see if it meets your needs. There are a few different sheets with different approaches.  
[https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Calculation-Filter-one-measure-but-not-others](https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Calculation-Filter-one-measure-but-not-others)

---

<div class="post-metadata">

**Author:** ![woliveiras](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/woliveiras/32/3080_2.png) [@woliveiras](https://community.amazonquick.com/u/woliveiras)\
**Post date:** [April 17, 2023, 5:54pm UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/7 "2023-04-17T17:54:09Z")

</div>

Thank you @Jesse . let me take a look and back here soon.

---

<div class="post-metadata">

**Author:** ![Kristin](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kristin/32/2470_2.png) [@Kristin](https://community.amazonquick.com/u/Kristin)\
**Post date:** [May 7, 2023, 12:49am UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/8 "2023-05-07T00:49:12Z")

</div>

@woliveiras Did Jesse’s solution work for you? Hope so.

---

<div class="post-metadata">

**Author:** ![woliveiras](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/woliveiras/32/3080_2.png) [@woliveiras](https://community.amazonquick.com/u/woliveiras)\
**Post date:** [May 7, 2023, 2:22am UTC](https://community.amazonquick.com/t/is-there-a-way-to-a-calculated-field-ignore-only-one-filter-and-consider-the-others/3561/9 "2023-05-07T02:22:10Z")

</div>

Hi @Kristin … sure. It was useful. Thank you
