# Getting matching values for the two different values!

**URL:** <https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510>\
**Category:** Q&A\
**Tags:** calculations, Business-Intelligence-Engineer, quick-sight\
**Created:** [May 26, 2024, 4:20pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510 "2024-05-26T16:20:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak1](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Deepak1](https://community.amazonquick.com/u/Deepak1)\
**Post date:** [May 26, 2024, 4:20pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/1 "2024-05-26T16:20:47Z")

</div>

select  
distinct

table.a,  
table.b,  
table.c,  
table.d,

table.a as a1,  
table.b as b1,  
table.c as c1,  
table.d as d1

from table

This is my script so i have taken the same column from same table but with different alias name.

now in the analysis page i will create two tables,

first table will include a, b, c, d and same i will create the filters also but this filter will not applied to second table  
second table will include a1, b1, c1,d1 and same i will create the filters also but this filter will not applied to first table

now i will select few values from the first tables filter and few values from the second table filter but filter values will diffrent from both the filters.

after applying the filter i want to see only the matching values in both the tables i dont want to see the unmatched one.

for example whatever a and a1, b and b1 value should be same accross both the tables.

so basicall requirement is the client want to with the diffrent filter value what all are matching values are there.

please help me with this one to achieve thank you in advance.

---

<div class="post-metadata">

**Author:** ![Naveed](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/naveed/32/961_2.png) [@Naveed](https://community.amazonquick.com/u/Naveed)\
**Post date:** [May 27, 2024, 6:22am UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/2 "2024-05-27T06:22:53Z")

</div>

Hi,

You can create a view based on two table and create the matching.

where b.id = a.id and other condition you want to show as matching.

Regards,  
Naveed Ali

---

<div class="post-metadata">

**Author:** ![Deepak1](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Deepak1](https://community.amazonquick.com/u/Deepak1)\
**Post date:** [May 27, 2024, 7:32am UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/3 "2024-05-27T07:32:09Z")

</div>

Hello @Naveed,

Thank you for your response!

I am not using two tables i am using single to pull the columns it just i am using different alias name to pull the columns two times.

So that i can apply diffreny values and see related to these two diffrent what are the same values.

Please let me know if you need more clarification thank you.

---

<div class="post-metadata">

**Author:** ![prantika\_sinha](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/prantika_sinha/32/21878_2.png) [@prantika\_sinha](https://community.amazonquick.com/u/prantika_sinha)\
**Post date:** [May 27, 2024, 10:08am UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/4 "2024-05-27T10:08:09Z")

</div>

Hi @Deepak1,

The use case is not clear, however I understand you want to compare a with a1 and b with b1.  
You can create a calculated field to check a=a1 and return TRUE or 1. Based on your requirement use OR/AND clause to check b=b1 and likewise. Use this calculated field as common filter to both visuals to be able to show only matching rows.

This solution may not be the optimum one. Please add more details of the use case if possible or a snip of expected output in an excel.

Thanks,  
Prantika

---

<div class="post-metadata">

**Author:** ![Deepak1](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Deepak1](https://community.amazonquick.com/u/Deepak1)\
**Post date:** [May 27, 2024, 2:28pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/5 "2024-05-27T14:28:48Z")

</div>

Hello @prantika_sinha,

Thank you for the response !!

Below are my requirements hope this is helpful,  
Note:- This data is coming from the same dataset

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/a/6/a67fdb0e32645f4a7758497e110d410e7660c29e.png)

---

<div class="post-metadata">

**Author:** ![prantika\_sinha](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/prantika_sinha/32/21878_2.png) [@prantika\_sinha](https://community.amazonquick.com/u/prantika_sinha)\
**Post date:** [May 27, 2024, 7:16pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/6 "2024-05-27T19:16:21Z")

</div>

Hi @Deepak1 ,

Here ([Sample solution 28May](https://community.amazonquick.com#Arena-dashboardId=ae978272-f849-4aae-ac9a-7e53ac50def5&authorId=CU-7605)) is a sample arena dashboard created basis the data you shared. Have tweaked the data a bit to check use cases.

Please check if this is what you were looking for.

Thanks.

---

<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:** [June 17, 2024, 6:16pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/7 "2024-06-17T18:16:17Z")

</div>

Hi @Deepak1,  
It’s been awhile since we last heard from you. Checking in to see if Prantika’s solution helped with what you were looking for or if you have any remaining questions?

If we do not hear back within the next 3 business days, I’ll go ahead and mark as the solution.

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:** [June 21, 2024, 8:12pm UTC](https://community.amazonquick.com/t/getting-matching-values-for-the-two-different-values/30510/8 "2024-06-21T20:12:26Z")

</div>

Hi @Deepak1,  
Since we haven’t heard back, I’ll go ahead and mark the solution. However, if you have any further questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!
