name (String),
startDate (DateTime),
finishDate (DateTime),
I want to setup a dropdown control that lets you set the name. Once the name is selected I want the parameters startDate and FinishDate to be set to the corresponding column value from my dataset.
This in turn will be mapped to dataset parameters, which I am hoping will re-execute the direct query and update the dashboard accordingly.
I am stuck with the part in bold. Is this even possible? My end goal is to use a string based dropdown to set two dataset parameters which are used in a direct query to reduce data for my dashboard.
@Ivan_Wahlrab - Hello Ivan, Thanks for posting this interesting use case. I know EriK has already shared some valuable suggestions. I just wanted to share my 2 cents. I am not 100% sure if this is going to work since I haven’t tried it first hand. Please feel free to explore it.
Since you mentioned that you have a table with the mapping between the names and its dates, I was thinking if you can use parameterized direct query dataset with the query being something like below :
select * from primary_table
where parimary_table_date_column >= (select start_date from secondary_table where name = <<$name>>)
and primary_table_date_column <= (select end_date from secondary_table where name = <<$name>>)
Here name is the dataset level parameter that you define and you link that parameter to the table where you have that user name with corresponding dates present. so, now in your report/analysis you will only have a single dropdown prompt where user will select only the user name and because of the one to one mapping between the name and dates, the main dataset query should be able to fetch its corresponding dates. This is only going to work if you have a single row per user. Sharing the associated link as well regarding usage of direct query dataset parameters for your reference. Let me know if this helps!