Hi!
I created a PostgreSQL dataset through custom SQL and added a parameter called ‘siteid’ so that my dashboard users can filter their relevant site IDs and then view their data:
However, when trying to create the dashboard, the user can only choose the default value:
@shirakoresh, i think here is what’s happening in your scenario. You have created siteid as dataset parameter and set its default value to 89. When dashboard is executed, it is passing 89 as parameter to your dataset and bringing data to dashboard that is related to site 89 and hence you can see only 89 as drop-down value. If you do not want the filter control drop down to be restricted by the default value, you can remove the default value and then drop-down will show all sites available in your dataset for users to select.
@shirakoresh you have parameters in two places, dataset parameter and analysis parameter. In dataset, when defining parameter, you include a default value that is a must. In analysis, when you are defining a parameter, you can leave the default value blank and map this parameter to the dataset parameter.
Let me know if this doesn’t help.
Hi! @DeepakS thank you for your answer! I deleted the default value from the analysis parameter, but i’m still getting only the same default value from the dataset parameter in the dropdown:
Can you please check if your dataset parameter is mapped with the analysis parameter? You can see unmapped dataset parameters on the analysis parameters
On this case, I created the parameter in the dataset like this
And this is my Custom SQL, as a direct query.
For the parameter in the analysis I created a new dataset with the distinct values for the segments in SPICE.
When creating the analysis based on the customer dataset, you should see the unassigned dataset parameter as in the first screen shot. Go to the map parameter and select Create new
When you add the control to the sheet, dont forget to also add it using the same dataset with the distinct values.
With this setup you should be able to open the analysis with the query that is launched against the filtered dataset not returning anything (or you can add a default of your liking)
Hi! @andres007
Thank you for your answer!
My field is not a sring, but an integer (ID) - so I can’t put n\a in the default value, and I can’t set it as a dynamic default (I can only put string fields there).
What can i do?
The problem is that I have to apply a filter to the dataset because it’s too large. I retained the ‘organization Id’ filter in the dataset, specifically when the default is 79.
However, I created a new parameter that isn’t directly linked to any dataset parameter, which filters the site Id. Now I am able to see all the relevant sites under my organization Id:
I understand the need for the filter, I was just checking if there was something odd with the dataset and showing it as a parameter, which you confirmed it is working as expected.
Have you tried removing the parameter mapped to the filter and start again from the unmapped parameter? If this would not work, maybe try creating a new analysis with only the dataset that needs to be filtered, add the dataset with the filters and see if when you add the parameter as a control to the analysis it works.
Hi!
Yes, I’ve tried to unmap the parmeter and map it again, I’m getting the same result…
I’m not sure what you mean by creating an analysis with only one dataset - this analysis is with one dataset that all of it need to be filtered. Can you try and explain me?
I just recorded a small video on how I made this work.
If you cannot make it work following these steps then this question may be difficult to answer through the community forum, and we need to dive deeper in your specific use case.
If this does not solve your specific problem, I will message you privately to discuss possible solutions and approaches.