I have a LINETYPE parameter with the following values:
INV_DEVICE
INV_SIM
TAX
OTHER_ITEMS
If the user chooses anything from the LINETYPE parameter anything that start with "INV_*", is it possible that another parameter field be populated dynamically?
For example, the user chooses INV_DEVICE. There would appear another parameter field called GOODSTYPE.
Values for GOODSTYPE are taken from the database. Example:
PAGER
GSMPHONE
SMARTPHONE
TABLET
But when the user chooses TAX or OTHER_ITEMS the user does not need to choose any value from GOODSTYPE, or the parameter field does not show at all.
The output of the report are those matching the criteria the user entered.
Note that for LINETYPE and GOODSTYPE, user can choose multiple values.
LINETYPE is a mandatory field, but GOODSTYPE will vary upon the values chosen by the user in LINETYPE
What you really want is call Cascading Parameters. The first selection leads to a refined list on the second selection which leads to another refined list, etc. Like Country -> State/Province -> City.
I don't use it but from what I gather, your selection needs to be stored in a table. To create a Cascading Parameter:
Create a new parameter
Under List of Values, select Dynamic
Select your value, description and Paramter
Set the option for Allow Multiple Values
repeat step 3-4 if you have more parameters.
Related
I have a gender of a person and i want to create such filter
How can i set deafault "men" value in this filter?
When user select another value and then deselect value i need to
return default value in the filter
I've already tried to create such a calculated field, but it does not work with
MIN({FIXED: COUNTD([gender])}) <> MIN({EXCLUDE [gender]: COUNTD([gender])}) OR MIN([gender])="men"
There are several tutorials about creating a default value for filtering (and several different techniques), one of them is this one: Dynamic Parameters, Default Values and the Flexibility to Choose
For me, if you just have to put "men" as default (I mean, not a calculated value, like today's DateTime), you can just filter man before publishing your dashboard to Tableau Server/Tableau Online and every use that navigates your content will find this value selected.
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
I have created a crystal report layout with 3 parameter.
The 3 parameters are
1.) Date range
2.) Supplier
3.) Location code
User will always give input to the date range but will select either of these remaining two parameters based on the usage.
Is it possible to configure in one single report with optional option in Crystal layout
Assuming you are not using a very old version of Crystal, when you create or edit a parameter, look at the list of parameter properties: one of them is 'Optional Prompt' -- simply change it from the default of False to True.
Then, in your record select logic you can use the HasValue() function to check whether the user provided a value for that parameter.
I want to use input controls in my report dashboard. I have 3 filters to apply. What I want to do is when I choose a date from the date filter the other filter must show the customers for that date only and when I select a customer then in third drop down list for third filter must show transactions carried out by that customer only.
In addition to these The dash board must display data for 'All' values in all the filters.
So that the user can view data for all transactions for all dates, all customers and also can select a particular date, customer and transaction
i guess you need to put parameters in the SQL queries, e.g you need to put a date_param in the second query(customers), then you need to put a cust_param in the transactional query. Before that you need to define those params in the designer too.
You can use cascading input parameters.
What is cascading parameters?
In cascading parameters the list of values for one parameter depends on the value chosen
in preceding parameter.
Order is important for cascading parameters because the dataset query for a parameter later in the list includes references to parameters earlier in the list.
For example suppose we have two input controls and names are Shipcountry and Shipcity, In this condition if we select Shipcountry then next input control Shipcity should show only those cities which belongs to that selected Shipping country.
You can refer this post for more detail Creating cascading input controls
You can add three input control p_date(DataType:Date), p_customer(Collection) and p_transaction(Collection), after adding parameters add condition in where clause of your query.
Where date_columns = $P{p_date}
AND $X{IN, customer,p_customer}
AND $X{IN, transaction,p_transaction}
Then create three input controls in JasperReport server with where clause in the query of 2nd and 3rd input controls.
I need two parameters in my report. I know how to make them, but I need the 2nd one to depend on what the person chose for the first answer. For example, if you choose USA as a country, I need the second one to show only states in the USA.
How can I do that?
while creating a parameter.
select option as dynamic.
Then start selecting the database fields in parameters, First select country and then states
by clicking on the 2nd column you name the parameters.. you can change the name as you wish after clicking ok by using rename option.
Now place parameters in report of set parameters in record selection formula.
When you refresh the report you get parameters with dependency.