Pass Dashboard Filter value to Data Model as a Parameter
Hi Team,
I was wondering if there is way to pass one dashboard filter value ( report id ) to the SQL query in the Data Model.
We have a scenario, when a user loads the dashboard one of the dashboard filters gets dynamically updated while in embedded mode. (We're using EmbedSDK).
I was trying several approaches for Cascading filters without using Dependent Filters feature as we want to have the freedom to control individual filters.
I read about Cascading filters by TriAnthony here (https://community.sisense.com/t5/knowledge/dashboard-script-for-automatic-filter-cascading/ta-p/18994 ). However in our use case, we have different dimensions that wont have same values but we need they need to be cascaded.
Your inputs are greatly appreciated. TIA
abhinavt
Posted 2 years ago·Last reply 2 years ago
8 comments
DRay
·2 years agoHello abhinavt.
I wanted to follow up to see if the solution offered by Support or javiers worked for you.
If so, please click the 'Accept as Solution' button on the appropriate post so other users with the same questions can find the answer. If not, please let us know so that we can continue to help.
Thank you.
abhinavt
OP2 years agoHey David,
We found a working solution for this, we were advised to convert all our dashboard filters to background filters. Later we made some changes to the code while embedding such that only the relevant selections from our embed platform are passed to each dashboard filter.
Note :This cannot be done through the frontend dashboard unless we add dependent filters. However, it's great that we found a solution through embedding.
javiers
·2 years agoHi @abhinavt
I'm not sure if I fully understood your use case but here are my 2 cents:
Wish it helps you!
abhinavt
OP2 years agoHi Javiers,
We have discussed this workaround with the Sisense developer support team. Unfortunately this doesnt fit our use case as users can open multiple tabs with different request ids. But they have suggested a solution to convert filters to background filters and some JAQL changes while embedding. This helped to pass relevant filters for each but background filter.
Although we are working to make sure the background filters stay single select (for our use case) as by default bg filters are multi select and will update once we found a permanent solution.
DRay
·2 years agoHi abhinavt.
Was support able to help you with this? If so, can you share the solution here so others can find it?
Thank you.
DRay
·2 years agoInteresting. I suggest opening a ticket with support to see if they have any suggestions, and if not we can schedule some time with a technical resource to work with you.
DRay
·2 years agoHello abhinavt.
Thank you for your question. Can you provide your use case? I would like to understand why you are trying to pass the filter directly into the query rather than using filters normally.
Can you set a default filter value and even hide the filter from the end user, or use data security to only show the user the data they need?
abhinavt
OP2 years agoThanks for replying David.
I had this thought while addressing a different problem regarding filters cascading/dependency. Currently this can be only achieved by using dependent filters, but we want to have control over each filter since we disable few of them in some widgets.
We're using a flat view in live connection that holds a request_id (dashboard filter) that is updated every time user runs a new report in embed platform.
If we include a WHERE clause with request_id in the live model then we dont have a problem working with dashboard filters.
Thanks,
Abhinav