Passing analysis parameters to dataset parameters with controls

Hi,

  • I have a parameter in my analysis called taskId (not linked to any dataset). – This is getting passed in via url

  • I have a sql-based dataset called: testDs that looks like this: select caseid, taskId from table1 where taskId = <<$taskId>>

  • I mapped my analysis taskId parameter to the dataset taskId parameter

In my analysis, I wanted to add an additional CaseId Parameter linked to a drop down control, this one linked to the testDs dataset.

I was thinking that the control would show values taking my taskId parameter into account. Instead it just uses the default value for the dataset taskId parameter. If I add caseId from testDs into a visual, it shows only the relevant CaseIds but not when it’s a control. Even if I add a filter for CaseId to the visual and pin it to the top of the sheet, it still doesn’t show any values in the drop down.

Is that intended or am I missing something?

Hi @evgeny55
If I got it right.
You are filtering the dataset with taskid already,right? If that’s working you should only see the caseids related to a taskid. If you are using caseid in visual or as control value should matter.
Maybe you can share some screenshots?
BR

Thanks @ErikG. Please see some screenshots below:

dataset:

Just to show what’s in the database table:


you can see that for TaskId = 13356 and 13349 there are a couple of different CaseId values

here’s my analysis parameter and you can see it’s mapped to the dataset parameter


and in the background you can see that when the control value is set to 13356, the CaseIds are filtered appropriately in the Table visual

You can also see from the above screenshot that I have a CaseId parameter. In the next screenshot, I add a Control for it and map it to the same dataset:

However, there’s no option available in the dropdown:

If I click to refresh on the control and look at the query being run in athena, you can see that the taskId parameter from the analysis is not used:

Hi @evgeny55

Do you use "show relevant values only "?

BR

1 Like

@ErikG
I tried it with and without and still the same behavior. When I add the “show relevant values” the resulting query is like this:

so it applies the relevant value to the outer query but the dataset is still using the default parameter.

I don’t really understand why the way I have it doesn’t work but I guess I could:

  1. create a separate dataset without parameters to populate the filters/controls
  2. connect those to analysis parameters
  3. link the analysis parameters to a separate dataset that I would use to populate the visuals.

I’ve been playing with this more and it seems like you can’t have any filters on visuals that are sourced by a sql-based dataset with parameters. I’m able to create a table and the table itself works but if I want to be able to add a filter on one of the group by columns, it doesn’t show any values because the inner query ignores the parameter mapping.

@Kristin I may be missing some steps somewhere but otherwise it seems like a bug. Is there a process by which this get flagged to the Quicksight team. I can implement workarounds but they take time and then more time to undo. Would be helpful to have a sense of where these types of things sit in the priority

1 Like

@royyung @Neeraj Can you confirm whether what @evgeny55 is referencing appears to be a bug? If so, could you tag as #bug and redirect @evgeny55 to our Customer Support?

Thanks!

Kristin