You may want to set up your [Batch ID Parameter] parameter
as an Input box with Allowable Values set to All
and a Default Value set to blank.
The you could create a [Batch ID Filter] calculated filter like this:
CONTAINS( UPPER([Batch ID]), UPPER( [Batch ID Parameter]) )
Put it on Filters shelf, select True and then -- it's important --
in the Filter dialog go to the Custom Value List section
and UN-CHECK Include all values when empty flag. That's it.
Hope it could help.
Can you share a snippet of your query where parameter value is used?
results as r,
max(CASE WHEN config_name = 'bandwidth' THEN config_value END) as bandwidth_config,
max(CASE WHEN config_name = 'latency' THEN config_value END) as latency_config,
CASE WHEN r.test_type IN (1,2,3,4) THEN 'Flash' WHEN r.test_type in (5,6) THEN 'Java Script' ELSE 'Unknown' END AS Engine
speedtestnet.results_configs rc LEFT JOIN speedtestnet.results r ON rc.result_id = r.result_id
) as rc
r.result_id = rc.result_id
r.result_id in (
select distinct result_id from results_configs
where config_name = 'batchId' and config_value in (<Parameters.Batch ID>)
Thank you for your reply! I have my parameter setup as an input box with allowable values set to all but I'm unable to set the default value you blank:
Whenever I delete the "Current Value" to show blank, it populates a 0 again, even when I do this from within the view filter:
This seems to be the crux of my issue, being unable to set the default value to blank.
Fact: there is no way to avoid query execution.
So what the problem do you have exactly? Starting with blank view or amount of time it takes to get to blank view?
If latter - then I would try to add extra conditions to your SQL to help database process it faster.
Something like WHERE IIF(<Parameters.Batch ID> < 0, 'FALSE', 'TRUE') AND [order id] IN (<Parameters.Batch ID>)
You might need to experiment as to where exactly (and in how many places) you'd need to add this in order to make it execute very fast. Can't tell from the syntax what's your backend but, perhaps, adding it to outer WHERE condition might be sufficient.
This is because your Parameter is of Integer type.
Change it to a String one -- and you could set it blank.
Of course CASTing from STR to INT would be required then:
// Modified Batch ID Filter
[Batch ID] = INT( [Batch ID Parameter] )