# How to create a percentage calculated field that is level aware?

**URL:** <https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112>\
**Category:** Q&A\
**Tags:** calculations, error, Business-Intelligence-Engineer, quick-sight\
**Created:** [November 13, 2023, 2:23am UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112 "2023-11-13T02:23:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![HKPMatt](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@HKPMatt](https://community.amazonquick.com/u/HKPMatt)\
**Post date:** [November 13, 2023, 2:23am UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/1 "2023-11-13T02:23:53Z")

</div>

For example, There are column A and column B.  
I want to calculate a calculated field of % that is (column A/column B) and show in a pivot table.  
The problem is the calculated field will sum up all the percentage of every breakdown level under its current level in the pivot table.  
How do I solve this problem?

---

<div class="post-metadata">

**Author:** ![HKPMatt](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@HKPMatt](https://community.amazonquick.com/u/HKPMatt)\
**Post date:** [November 13, 2023, 9:45am UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/2 "2023-11-13T09:45:10Z")

</div>

For more details, the calculated field can be break down by a hierarchy C, D, E, etc.  
I want to show the % of columnA/columnB whenever I expand the level C ,D and even E.

---

<div class="post-metadata">

**Author:** ![ErikG](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/erikg/32/14524_2.png) [@ErikG](https://community.amazonquick.com/u/ErikG)\
**Post date:** [November 13, 2023, 9:52am UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/3 "2023-11-13T09:52:17Z")

</div>

Welcome @HKPMatt  
couldnt you just change the aggregation to avg?  
 ![grafik](https://d1wl4jav5dp96l.cloudfront.net/original/2X/5/533f1b8d5e62ca22d153e72edc3c8e2cb7ab4b5c.png)  
BR

---

<div class="post-metadata">

**Author:** ![HKPMatt](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@HKPMatt](https://community.amazonquick.com/u/HKPMatt)\
**Post date:** [November 14, 2023, 4:25am UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/5 "2023-11-14T04:25:06Z")

</div>

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/8/80fca4f67e49989a61f3263ec8d5911198e88db9.png)

since there are offsetting at lower hierarchy, averaging the percentage will not work well here.

---

<div class="post-metadata">

**Author:** ![WLS-D](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/wls-d/32/36109_2.png) [@WLS-D](https://community.amazonquick.com/u/WLS-D)\
**Post date:** [December 18, 2023, 6:29pm UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/6 "2023-12-18T18:29:47Z")

</div>

Hello @HKPMatt and @ErikG !

@HKPMatt are you still running into this problem or were you able to find find a solution? Or was @ErikG 's response helpful in finding a solution?

If so could you post your workaround to help the community or mark one of the comments above as the solution?

---

<div class="post-metadata">

**Author:** ![WLS-D](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/wls-d/32/36109_2.png) [@WLS-D](https://community.amazonquick.com/u/WLS-D)\
**Post date:** [December 22, 2023, 3:23pm UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/7 "2023-12-22T15:23:43Z")

</div>

Hello @HKPMatt and @ErikG !

It has been some time since we have heard from you but we would still like to help you find a solution.

If there is not activity on this thread in 4 days this topic will be archived.

---

<div class="post-metadata">

**Author:** ![WLS-D](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/wls-d/32/36109_2.png) [@WLS-D](https://community.amazonquick.com/u/WLS-D)\
**Post date:** [December 27, 2023, 3:44pm UTC](https://community.amazonquick.com/t/how-to-create-a-percentage-calculated-field-that-is-level-aware/21112/8 "2023-12-27T15:44:10Z")

</div>

Archived on December 27, 2023, 3:44pm UTC


