# We need to calculate the Actual Amount in Amazon Quick Sight while ensuring the below mentioned requirements

**URL:** <https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339>\
**Category:** Q&A\
**Tags:** visuals, filters, calculations, analysis, Business-Intelligence-Engineer, dataset, quick-sight\
**Created:** [December 3, 2024, 8:20pm UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339 "2024-12-03T20:20:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepshikha](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@Deepshikha](https://community.amazonquick.com/u/Deepshikha)\
**Post date:** [December 3, 2024, 8:20pm UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339/1 "2024-12-03T20:20:27Z")

</div>

We need to calculate the Actual Amount in Amazon Quick Sight while ensuring the following:

1. Merging Dates:

- Use date\_created if deact\_date is NULL.
- Use deact\_date if date\_created is NULL.
- Only include rows where date\_created and deact\_date fall in the same month or if one of them is NULL.

1. Activated Amount:

- Calculate based on date\_created.

1. Deactivated Amount:

- Calculate based on deact\_date.

1. Final Actual Amount:

- Combine activated and deactivated amounts for valid merged dates.

---

<div class="post-metadata">

**Author:** ![Giridhar.Prabhu](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/giridhar.prabhu/32/27789_2.png) [@Giridhar.Prabhu](https://community.amazonquick.com/u/Giridhar.Prabhu)\
**Post date:** [December 4, 2024, 5:54am UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339/2 "2024-12-04T05:54:04Z")

</div>

Hi @Deepshikha,

Ideally you can do this as part of your dataset. I am not sure what is the source of your data. If it is a database a Custom SQL can handle all this easily.

However, if you are not familiar with SQL you can create calculated fields in your dataset to do these calculations and get the results you want.

Regards,  
Giri

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [December 20, 2024, 9:45pm UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339/3 "2024-12-20T21:45:31Z")

</div>

Hi @Deepshikha,  
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [December 26, 2024, 6:01pm UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339/4 "2024-12-26T18:01:56Z")

</div>

Hi @Deepshikha,  
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [December 26, 2024, 6:02pm UTC](https://community.amazonquick.com/t/we-need-to-calculate-the-actual-amount-in-amazon-quicksight-while-ensuring-the-below-mentioned-requirements/39339/5 "2024-12-26T18:02:02Z")

</div>

Archived on December 26, 2024, 6:02pm UTC


