I have two datasets with dataset parameters
dataset1: a business requirement dataset with dataset parameter UID, DateRange, CID
dataset2: a list of CIDs with dataset parameter UID
here the UID for the both the dataset is same.
UID is passed from the embedded application.
DateFilter is from controls (this is achieved)
using dataset1 created a pie chart
my requirement:
in the pie chart visual, create a dropdown control based on dataset 2
already implemented:
- I created an analysis parameter CID based on the dataset parameter in dataset1
- Added controls to the analysis parameter CID and linked to dataset2
now the CID control appears and load the CIDs based on the default UID defined in dataset
Issue:
When a dynamic UID is passed from the embedded application the pie chart is reflecting based on the UID but the control is populated only based on the default UID configured in dataset 2
expectation:
The dropdown control should dynamically load based on the UID passed from the embedded application
Note: am using session package so Row Level Protection is not applicable in my usecase.
It would be helpful if someone could help to resolve this at the earliest. thanks in advance
Hi @Oliver_Smith_Iruthay, without looking at the code and debugging, it’s going to be hard to troubleshoot. I would recommend filing a case with AWS Support where they can dive into the details so that they can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!
Maybe you can share snippets of the code here and we can try to help you debug.
I would like to try my best before raising an internal ticket, below are the code snippets and screenshots
gl dataset:
select
coalesce(rsa.***, 'Uncategorized') as "G****t",
sum(p**e * q**y) as "T*****d"
from itemtable item
join usertable rauser on item.acnt_id=rauser.acnt_id
left join subaccount rsa on item.acnt_id=rsa.id
where rauser.user_id=<<$UserId>>
and item.date >= <<$StartDate>>
and item.date <= <<$EndDate>>
and item.state = 2
and item.type in (0,1)
and item.company_id = <<$CompanyId>>
group by 1
companies:
select
ruser.user_id,
ac.id::text as company_id,
ac.name as company_name
from company ac
join location rr on ac.id=rr.company_id
join locationuser ruser on rr.id=ruser.restaurant_id
where ruser.user_id=<<$UserId>>
group by 1,2,3
order by 1
using the gl dataset I created a chart its working fine
using the companies dataset am trying to create a dropdown control through following steps
Mapped the CompanyId dataset parameter of gl dataset to the analysis parameter and clicked on Add Control
Linked the dropdown control to companies dataset
Assigned company_id field to the dropdown control by selection the field
Control appears at the top of the sheet
above dropdown control is loading based on default UserId parameter configured for companies dataset
company control is loading based on default UserId parameter configured in companies dataset
Even after the UserId parameter is changed the company control displays values based on the default UserId configured in the companies dataset
I have put *s in few column selection for security purpose
@Xclipse could you help here please, I have attached code snippets and screenshots
Hi @Oliver_Smith_Iruthay, thanks for the detailed explanation. There are several approaches:
-
Use custom HTML/JS controls outside to render the Visuals - amazon-quicksight-embedding-sdk/README.md at master · awslabs/amazon-quicksight-embedding-sdk · GitHub
-
Filtering at Runtime - Filtering data at runtime for embedded dashboards and visuals - Amazon QuickSight
-
Using Parameters in URL - Using parameters in a URL - Amazon QuickSight
The key is to reinitiate the rendering using JS/SDK.
Hope this helps.
Alex
1 Like
Hi @Xclipse thanks for the response,
- Use custom HTML/JS controls outside to render the Visuals - amazon-quicksight-embedding-sdk/README.md at master · awslabs/amazon-quicksight-embedding-sdk · GitHub - by this you mean loading visual on button click rather than rendering when the page loads right?
Yes, that is correct. Use the html controls to trigger the rendering action.