How to refresh data when we add an option to an tableau parameter? - tableau-api

I have a Tableau report that has a parameter. I added a new calculation to the parameter. But when I try to refresh data on the report (upon clicking my new option in the parameter list) it doesn't refresh data in the report.

If you're using a parameter in order to filter data on your worksheet, then it must be part of a calculated field (that is then used as a filter) or used directly within a Top N filter as follows:
Using Parameters in Calculated Fields
Using Parameters in Filters

Related

Filtering Based on a Different Column on Tableau

I'm wondering if something like this is possible.
Assume I have a data table like this:
I want a filter, where user picks France for example, but the data is filtered based on corresponding Continent value, e.g., all Europe records should show up.
Is this possible?
Sure, We can do that. If you add country to Filters shelf, Tableau will show only records of selected value. In our case, if we filter "France", Tableau shows only records which has France. So we will miss other Europe records. Parameter can handle this scenario. Follow below steps.
1.Create a String parameter
2. Create a calculated field
3. Add the created calculated field to Filters shelf then choose 'show'
4. Right click parameter then 'Show parameter control'. So it will works like filter
Method 2: Dynamically change parameter value
Pros: No hard coding, dynamically changes value based on selection. It works, well on dashboard
Cons: You will not have drop down for selection like filter. So, you need to click a chart to trigger the changes.
1. Create a String parameter with allowable values as 'ALL'
2.Create a calculated field
3.Create a parameter action in dashboard.
Dashboard-> Actions-> Add Action -> Change Parameter
In Change Parameter dialogue box, set target parameter as 'Parameter Name' and value field as 'Continent'
4. Add the calculated field to filter and select 'True' on other sheets
5. Final Dashboard looks like
Click the icon on the selector sheet. It will automatically filter data on data sheet.
Inside the selector sheet

Show all parameter values

My parameter field allows multiple values. How can I show all of these values at the top of the report? Currently it only shows one value at a time.
If your parameter is dynamic and takes the form of an array, you'll need to join the values together via a Formula:
Join ({?Parameter},", ")
Activate the Can Grow property for that field. Put this field in a new section so it can easily grow based on your content.

Jaspersoft Studio: Force input parameter of subreport to be entered manually

In my main report I get a (small) list of string values from the data base. I then want to use this list for selecting records in a subreport, along with other input parameters:
The user shall be able to select records based on a range of begin and end date -- this is easy using an input parameter of type java.util.Date with "Is For Prompting" set to true. Another criteria shall be one or more items from a list showing values from a data base field. I could define the list in the report template, but then I'd have hard-coded strings (filled from the data base, but at definition time only).
Now the dilemma is: If I define the input parameters in the main report, I cannot get the values for the list beforehand; if I define them in the subreport, I get no prompt at all, so there's no way to set any of them.
So the report requires values for start and end date, and a list of string values to select from (multiple itmes can be selected). This list shall be built from values from the data base. In the subreport all these values shall be joined into a filter for the records. A user shall be able to define the dates and select items from the list manually before executing the report.
Is there a way to achieve this?
After some more hours of trial & error, and some more research, of course, I found that the keyword is "Query-based Input Controls". This documentation describes their creation on the JasperReports Server. Such input controls can be edited in Jaspersoft Studio as well, however, they actually work on the server only. Anyway, this is the solution to my problem.

Dynamic Dependent Parameters in Crystal Report

I am looking to create a report based on two parameters, VENDOR and PONUMBERS.
I would like to create the report in such a way that on loading report when we choose a vendor
as First parameter it should show just the PONUMBERS for that vendor on second parameter. Is it possible in Crystal Reports ?
yes its possible...
While creating a parameters use dynamic parameters not static from the dropdown
select first parameter as Vendor and second parmeter as PONumber.
Now when you refresh the report second parameter will be filtered as per the selection of first parameter.

Passing values from main report to subreport in JasperReports

I have a simple select sql query with 2 parameters that I want it to be in my query text in main report. It returns about 100 values that I want to put in 10 subreports (10 values per subreport). On main report I need to display only one parameter. All the values from query I need to be in subreports. How do I pass them?
Connection to database is returned to me from application, parameter values also. I'm using iReport 4.7.0.
Parameters are attached to the dataset, if you expand the dataset itself, you'll find a section there for parameters, just like in your main report.
You'll need to link the parameters together though, using the connection properties where you're actually using the dataset, eg, in a chart or a table. For example, in the table, you go to the dataset tab of the properties pane, and click on the parameters button to map the parameters between your main report and your sub dataset.
More here.