# How to pass the selected data point from visual of datasetA as dataset parameter of datasetB

**URL:** <https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902>\
**Category:** Q&A\
**Tags:** dataset-join, developer, quick-sight\
**Created:** [October 2, 2025, 7:23am UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902 "2025-10-02T07:23:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kang\_Hong](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@Kang\_Hong](https://community.amazonquick.com/u/Kang_Hong)\
**Post date:** [October 2, 2025, 7:23am UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/1 "2025-10-02T07:23:21Z")

</div>

Background:

I have 2 datasets; DatasetA and DatasetB.

DatasetA has a dataset parameter using dates and it returns an ID column.

DatasetB has a dataset parameter using cid and it returns many columns.

We are using dataset parameter to reduce the records retrieved, instead of SELECT-without-condition-then-apply-visual-filters.

Requirement:

I want the dashboard user to input a date control to retrieve the relevant records from DatasetA, then select/click on one of the returned ID value.

This selected ID value should then be passed as the dataset parameter of DatasetB for B to retrieve the relevant records.

What I tried #1:

In visual of DatasetA, add a Filter Action with the selected fields = ID column.

Target visual as DatasetB visual and ensuring the name of DatasetA.ID and DatasetB.cid matches (to satisfy field mapping).

I can only achieve the behaviour if DatasetB is a SELECT-without-condition.

What I tried #2:

In visual of DatasetA, add a Navigation Action to target the analysis parameter mapped from DatasetB dataset parameter cid. But the parameter value to pass seems to only allow ALL or Custom.

Is there a placeholder variable like \<\> I can put in the parameter value to mention the selected data point?

I hope the description is clear, Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [October 2, 2025, 4:53pm UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/2 "2025-10-02T16:53:27Z")

</div>

Hi @Kang_Hong , welcome to the QS Community 🙂

I’ve tried replicating your need, I’m not sure 100% that I’ve got it right, so please let me know if this works for you or not.

I’m supposing you have two different datasets coming from two database tables.  
Let’s say:

**Table A**

| ID | transaction\_date | amount | description |
| --- | --- | --- | --- |
| C001 | 2024-01-01 | 1000.00 | “Initial transaction” |
| C001 | 2024-01-15 | 500.50 | “Follow-up payment” |
| C002 | 2024-01-02 | 750.25 | “New subscription” |
| C003 | 2024-01-03 | 1250.75 | “Premium package” |
| C004 | 2024-01-04 | 325.00 | “Basic service” |
| C005 | 2024-01-05 | 899.99 | “Advanced package” |

**Table B**

| cid | customer\_name | email | status | last\_update | additional\_info |
| --- | --- | --- | --- | --- | --- |
| C001 | John Doe | [john.doe@email.com](mailto:john.doe@email.com) | Active | 2024-01-20 | “Premium customer” |
| C002 | Jane Smith | [jane.smith@email.com](mailto:jane.smith@email.com) | Inactive | 2024-01-18 | “Basic plan” |
| C003 | Bob Wilson | [bob.wilson@email.com](mailto:bob.wilson@email.com) | Active | 2024-01-15 | “Corporate account” |
| C004 | Alice Brown | [alice.brown@email.com](mailto:alice.brown@email.com) | Pending | 2024-01-19 | “Trial period” |
| C005 | Charlie Davis | [charlie.davis@email.com](mailto:charlie.davis@email.com) | Active | 2024-01-17 | “VIP member” |

Let’s say I’ve created the two datasets adding the parameters needed in the **DataPrep** in this way:

```auto
Dataset A Query:
SELECT * FROM "default"."dataseta"
WHERE transaction_date >= <<$DateFrom>> AND transaction_date <= <<$DateTo>>

```

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

```auto
Dataset B Query:
SELECT * FROM "default"."datasetb"
WHERE CID = <<$SelectedID>>

```

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/c/7/c75bb6871391168ad375e23b877c66a40e97fbc7.png)

Now, on Analysis window.  
If all the defaults you set in the **DataPrep** are outside your data rage, you should have something like this: first visual created from `Dataset A`, second one from `Dataset B`

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/d/ddb1e2e050025803fa683c18942580503666e89b.png)

I now create 3 parameters (select the defaults based on your needs):

- `PDateFrom` (date)
- `PDateTo` (date)
- `PSelectedID` (string)

For all these I’ve added also a Control on top of the page:  
 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/0/1/0136243511ce3c4667f0b54910a4f185f605a200.png)

On the `Selected ID` control, choose _Edit_. Here you can define this control to show only values coming from the `Dataset A` `id` field:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/1/0/10463bd93919849ce6fdc0e26d8358584d007580.png)

Now you have three **params** in Analysis and the corresponding params in each Dataset.  
From the Params view in Analysis you can now map the Parameters:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/9/8/98d61c1638f17fd89a731074874f599fdc5d77a8.png)

**ATTENTION POINT:**  
Arrived at this point, I noticed that the `Selected ID` _control_ does not seem to be updated accordingly to the values shown selecting dates for `Dataset A`.  
An alternative can be (if it’s feasible for you) creating a visual that will just show the distinct values of the IDs in that date range, and then add (instead of a control) an Action on that visual.

Something like a visual with the IDs list:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/8/7/876b43fe2b1b46faa52e8d6d33b907636da54f74.png)

and when you click on one, Dataset B is updated using the SelectedID param

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/0/9/09afea89ac6b0045b716cb4e7bab47937712d3ab.png)

The result will be:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/e/9/e9030b1c8ae13b7fee87e5a5cee00740cff62486.png)

**NOTE:**  
Just be sure that, by doing this (using custom queries w params), you do not overload the original data source, since each time you’ll change something in these parameters, a new query will be launched on your original source 🙂

Hope this is helpful!  
Andrea

---

<div class="post-metadata">

**Author:** ![Kang\_Hong](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@Kang\_Hong](https://community.amazonquick.com/u/Kang_Hong)\
**Post date:** [October 2, 2025, 5:19pm UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/3 "2025-10-02T17:19:16Z")

</div>

Hi Andrea,  
Thank you for the help.  
Unfortunately I can only try it out next week.

One thing I wanted to ask is the Action that you set up,  
where you put ‘Field : id’.  
I remember the options for parameter value are ‘All’ or ‘Custom Value’.  
Is ‘Field : id’ manually input by you in the ‘Custom Value’ cell?  
Does QS recognise this ‘Field’ syntax to refer to the clicked data point?

Thank you~

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [October 3, 2025, 7:35am UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/4 "2025-10-03T07:35:22Z")

</div>

You should have the choice to select also a Field:

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/3X/d/f/df18f7df0f1a9c2aeab87e397978fa8f2718ef08.png)

If not, try to specify the fields type you have, how you built the param etc, maybe there’s some configuration that is preventing you to select the field, but it’s strange.

Let us know! 😃

Andrea

---

<div class="post-metadata">

**Author:** ![Kang\_Hong](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@Kang\_Hong](https://community.amazonquick.com/u/Kang_Hong)\
**Post date:** [October 6, 2025, 10:08am UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/5 "2025-10-06T10:08:34Z")

</div>

Hi Andrea,

Thank you very much for your pointers.

Previously I was only able to see the All and Custom when Set Parameter value. Turns out there was data type mismatch.

After aligning the data type, I am able to select the Field:id and get the action behaviour to work.

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [October 6, 2025, 2:30pm UTC](https://community.amazonquick.com/t/how-to-pass-the-selected-data-point-from-visual-of-dataseta-as-dataset-parameter-of-datasetb/49902/6 "2025-10-06T14:30:55Z")

</div>


