Tableau hide parameter header when parameter value is "hide" - tableau-api

I have a tableau table that looks like below
Here, I have created 3 parameters (and corresponding calculated fields).
a) Level_1_selected_dimension
b) Level_2_selected_dimension
c) Level_3_selected_dimension
Each of the parameter has a value called hide which is to turn off the drilldown.
For example, user can choose values for Level_1_selected_dimension and Level_2_selected_dimension but decide to not select any value from 3rd parameter (Level_3_selected_dimension). Hence, the value is set as hide for 3rd parameter as shown below
But the problem now, the header for 3rd level is still shown/displayed in tableau as shown above in my post?
How can I turn off the header/hide the header for 3rd level (as value for 3rd level is hide)?
I expect my output to look like below

In order to achieve this, we need to create another parameters for labels to hide and show the Level 1,2,3 value for example if Level 1 ='hide' then ' ' else Level 1 and use this parameter as Label instead of original dimension. There is no direct way to hide the columns in tableau.

Related

Creating a combined option in dimension

I have a dimension which is simply a list of user groups such as the below:
User Type
Type A
Type B
Type C
I am currently visualising these as an individual pie for each user type with the numerical value shown in the middle which is their answer to a question from another measure. However, I'd like to create a fourth type which is 'All users' so that I have four pies showing at once: All Users, Type A, Type B and Type C.
Is this possible? Would it be a calculated field? I have tried groups but can't get it to work.
Any help much appreciated!
Assuming for the moment that you have User Type on the Columns shelf, you can simply choose Totals->Show Row Grand Totals from the Analysis menu.
An alternate approach is to display two worksheets on the same dashboard. To do that, simply duplicate your worksheet. Remove User Type from the view in the new worksheet. And then place both views next to each other on a dashboard, possibly in a layout container to keep them lined up nicely. Format a bit to remove the titles and outside borders and they can look like one unit.
Remember what a dimension does. It partitions the data rows according to the value of the dimension field, assigning each data row to exactly one partition - exactly like a Group By clause does in SQL. So a data record can’t be associated with more than one member of a dimension. Totals behave differently, which is why they address your use case.

Restricting tableau filter options without changing underlying data or display

I am looking for a way to restrict the filter options on a dashboard without changing the underlying data or display.
For example, with a dataset of
Company A: 10 units.
Company B: 5 units.
Company C: 2 units.
I would like the Total Units to display as 17 when no filter is applied, however I would only like to show 'Company A' as an option in the filter.
I can't see your data, so I'm approximating the column names and values. You'll have to adjust these on your end.
Create a parameter, like CompanyFilterParameter, with the values 'Company A' and 'All'.
Create a calculated field to use as your filter, CompanyFilter:
[CompanyFilterParameter] = [Company] OR [CompanyFilterParameter] = 'All'
Put [CompanyFilter] on the Filter card and set it to true. Finally, add your parameter control to the sheet (right click [CompanyFilterParameter] and select "Show Parameter Control").

Graph based on the user filter selection

On a tableau dashboard there are 2 filters and a bar graph.
The filters are 1. to select top or bottom customers
2. how many ex:5,10,15 etc
when the user selects top and 5 in the respective filters then top5 customers have to show in the bar graph.
if the user selects bottom ,10 in the respective filters then bottom 10 customers have to shown in the graph.
how to achieve this when the data contains only customers details and their billing amount ?
Instead of filter, you can go with the Parameter for getting the result. I have done the top and bottom multiple times in many of the tableau visualizations and its so easy.
Below are the steps to achieve your requirement.
Create a parameter that will allow you to select top and bottom
Create another parameter that will allow you to select the desired numbers like 5, 10, 15 etc.
Here i have created a parameter that will have values from 10 to 50 in a step size of 10.
Create a calculated field that will subset data based on the parameters chosen
In the above screenshot, I am using the top site parameter and creating a conditional statement that will show the states based on the value chosen in the site parameter and the value for that state.
Put the calculated field in the filter and select show and click ok in the filter box.
Now the view will show the top count based on the value selected in the parameter.
Please note the calculation is for top N and for bottom N you need to change the calculation.
Hope this will help you. I can provide you a workbook if you need.

Tableau - table formatting, stop merging/centring

I can't figure out an option I'm sure Tableau has.
Its easier to explain with visually so I'll show you what my table looks like and what I'd like it to look like (at least when I export to excel).
Looks like:
Date Group
1st a
b
c
2nd a
b
c
What I would like:
Date Group
1st a
1st b
1st c
2nd a
2nd b
2nd c
So I'd like no merged or blank values as at the moment when I export to Excel I have to unmerge and then manually fill the blanks which for large sets of data is a nightmare.
What you can also do is create a calculated field and then add all the Dimesions you are using. Add this to the left side of the shelf and then right click and untick "Show header". It will now export as you wanted, you will just have to delete Column A.
There are a couple of ways you can do this:
Put the row's distinct value (aka - deepest level of detail) in your first column.
Use the View Data feature under Analysis in the Menu bar (also found in other places).
Actually you can create a calculated field then just input index() in it;add this field to the left side and hide it.

Dynamic parameters in Crystal report

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.