# DIFFERENCE

**URL:** <https://community.amazonquick.com/t/difference/38844>\
**Category:** Q&A\
**Tags:** calculations, Business-Intelligence-Engineer, quick-sight\
**Created:** [November 22, 2024, 12:59am UTC](https://community.amazonquick.com/t/difference/38844 "2024-11-22T00:59:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geral](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Geral](https://community.amazonquick.com/u/Geral)\
**Post date:** [November 22, 2024, 12:59am UTC](https://community.amazonquick.com/t/difference/38844/1 "2024-11-22T00:59:45Z")

</div>

I want to compare two values

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/7/9/796aef6ccd0728c4abb7784d1f240fe5feadeb1d.png)

I want to calculate the difference of the value “PESO CANAL IN MX” vs the value “PESO CANAL IN US” (delta)

---

<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:** [November 22, 2024, 5:15am UTC](https://community.amazonquick.com/t/difference/38844/2 "2024-11-22T05:15:22Z")

</div>

Hi @Geral,

Computing the number is probably possible in the Calculated field.

However, important question is how do you want to show this in the visual. Can you provide us the expected presentation of this data?

Regards,  
Giri

---

<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 22, 2024, 12:30pm UTC](https://community.amazonquick.com/t/difference/38844/3 "2024-11-22T12:30:29Z")

</div>

Hi @Geral  
you could use table calculation with the pivot table. but isnt nice solution.  
Any chance to calculate it on database level?  
BR

---

<div class="post-metadata">

**Author:** ![Geral](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Geral](https://community.amazonquick.com/u/Geral)\
**Post date:** [November 22, 2024, 6:27pm UTC](https://community.amazonquick.com/t/difference/38844/4 "2024-11-22T18:27:02Z")

</div>

Hi @Giridhar.Prabhu, I want to show mi data in this way

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/c/d/cd6e0a115747783278dd9c343ef52dd4bbc8ddd0.png)  
I try to do the calculation in this way  
 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/3/d/3de32f9a87ace94a2e12223c75b02364f4e13dae.png)

---

<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:** [November 26, 2024, 1:45pm UTC](https://community.amazonquick.com/t/difference/38844/5 "2024-11-26T13:45:09Z")

</div>

Hi @Geral

See if the following approach would work for you?

> [@Question about difference calculation in pivot table](https://community.amazonquick.com/t/question-about-difference-calculation-in-pivot-table/563):
>
> Hi, I have a Analysis as such: With the same aggregation/dimensions showing in table, is there any way I can calculate difference between A-B, A-C, A-D and so forth? From [difference - Amazon QuickSight](https://docs.aws.amazon.com/quicksight/latest/user/difference-function.html) it says this function only works for the difference between measures based on one set of partitions and sorts. Therefore, if index is -1, right now I can only achieve A-B, B-C, C-D and so forth. Thank you for any help!

---

<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 9, 2024, 8:19pm UTC](https://community.amazonquick.com/t/difference/38844/6 "2024-12-09T20:19:53Z")

</div>

Hi @Geral,  
It’s been awhile since we last heard from you, did you have any additional questions or were you able to find a work around?

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 12, 2024, 7:32pm UTC](https://community.amazonquick.com/t/difference/38844/7 "2024-12-12T19:32:48Z")

</div>

Hi @Geral,  
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 12, 2024, 7:33pm UTC](https://community.amazonquick.com/t/difference/38844/8 "2024-12-12T19:33:00Z")

</div>

Archived on December 12, 2024, 7:33pm UTC


