add values next to percentage of total in Tableau - tableau-api

I am new user of Tableau and I have a question:
How can I present both the values and the percentage of total in stacked column in tableau?
here is example how it should look like (i know how to do it in excel but not in Tableau):

Just add both values to label. After you compute the percent of total on SUM(Teus) hold down control to make a copy and drag it to Label to explicitly have it displayed. Then drag a new SUM(Teus) from the data pane onto Label as well. Now you will be able to see both values. You can then click on the Label button and then the [...] button if you want to customize how these values are displayed. Side note: you are getting those skinny bars because you have Year as a continuous dimension. Using it as a discrete dimension will give you the thick bars.

Related

Showing absolute and percentage values in Tableau

I want to show both absolute and percentage value in a single view in the form of a matrix.
In the below view I am trying to add one more column showing values as percentages of total
Got hint here but not able to replicate:Tableau - Both count and Percentage in Measure Values
The data is like this
can any one please suggest!
Not that difficult. I recreated a data like yours,
Follow these steps
Add slide on rows
Add number of records in text on marks card
Add table calculation on this field -> percent of total. The view will look like this
Notice a small triangle in 'no of records' field. That indicates that it is table calculation
Add number of records field once again to text. (Tip: Double click the field number of records to add it to view directly)
Reorder as you like
or with totals

Report labels match a dropdown in report builders

I have a report that is designed to allow users who aren't proficient in Tableau visualize data in the form of a bar graph. There are some drop downs on the side that allow them to select some dimensions. These dimensions then populate the graph. The labels in the graph, however, do not match the dimension name selected, and I was curious how to do this. So for instance on the right hand side Dimension 1 is set to Item Subcategory, and I'd like it to say that in the graph as well, instead of being labeled Dimension 1.
The drop downs on the right are generated from this code in the dimension itself:
If anyone has any ideas on how to do this, I'd really appreciate it. Thanks!
The way I would do this would be to hide the column headers on the sheet itself, or edit their aliases to just a bunch of spaces so it appears blank.
You can then create a sheet with the Dimension 1 parameter on the Text shelf, formatted to look like a column header (or formatted however you want it to look), and add that sheet to the dashboard as a floating sheet. Repeat for the other two dimension parameters, position the sheet above the column so it looks like the header, and there you go! Whenever the parameter changes, the column header will change to match too.
I would note that this only works if the sheet is on a fixed-size dashboard, since floating sheets don't usually play nice with auto-sizing dashboards.

Qlikview - sum in expression

I have bar chart with dimension State,
and I need to get sum of Amount group by item,location.
I create bar chart, set dimension State,
and try to use dimension like
=sum(aggr(Amount,Item,Location))
and only if I select State I get bar chart for selected state.
But I want to have all state in bar chart with sum of amount...
now I have only no data to display.
In sql I use
select state, sum(Amount)
from MyTable
group by Item,Location
I need barchart with dimension state and expressions amount gropu by item,location
Any idea?
If I'm understanding correctly, to get this in a bar chart, you could use dimensions Item and Location and then set the bar chart expression to sum(Amount). You can then make a selection in the State field to get the appropriate chart for that state. Depending on how many items you have in your data and how many locations, this may not be a very readable chart.
If you need bar charts for each state to be generated, you could try enabling a Trellis chart by clicking the Trellis button on the dimensions tab and checking the 'Enable Trellis Chart' checkbox. When you do this, the first dimension will become the trellis dimension, so for this, you'll want three dimensions: State, Item, and Location in that order. The problem with the trellis chart is that it's ugly and completely impractical for large samples.

Tableau - Combining multiple line graphs into single plot

I am trying to get all my lines to overlap on a single graph. How would I go about doing this? Here is what I managed to get so far:
And when I say overlap, I mean something similar to this:
Here is more information about my data:
Each of the attributes (e.g. 'Intro', 'Flair') have the following integers in the data: 1,2,3,4 with an associated pcttip (tip percentage) as a decimal number.
I have manually right clicked on each of the measures in the columns area and changed them to "dimension".
The dataset can be found here if you would like to try: https://www.dropbox.com/s/je72hbso2tzby60/Tableau_data_2.xlsx?dl=0
You can do this in Tableau fairly easily. You need to pivot some of your data.
Click on the data source in the top-left and select Edit Data Source
In the bottom pane, where your data is previewed, select/highlight each of the fields that you want measured (Intro, Flair, etc.)
Right-Click with those fields selected and click Pivot
When you return to your sheet, you will see a new dimension field and measure field for your pivot.
Add [Pivot field values] to the Columns section - make sure this is set to 'Dimension' and 'Continuous'
Add [Pivot field names] to the Color card
Pivot
Output
Drag 'Repeat' pill to the X-axis on 'Intro' then drag the other pills into 'Intro'
Something similar to this: https://onlinehelp.tableau.com/current/pro/online/mac/en-us/buildexamples_line.html

tableau adjust placement of gantt bars

In Tableau, I have a dual-axis bar chart of some data with their margins of error. I am using Gantt bars for the error data, and I want to overlay the error bars on top of the original data. My problem is that I can't figure out how to adjust the placement of the Gantt bars so that they are centered over the top of the original bars, with the error value displayed both above and below the bar.
I am pretty sure I need to create a Calculated Field but am new to Tableau and coding and don't really know how to go about this.
You can do this without the use of Calculated Fields as follows:
Create a Bar Chart with the original data
Duplicate the Bar Chart by Ctrl-Clicking the measure pill in the Rows shelf
You should get 2 charts one above the other now, select one of the charts from the Marks dialog, and change it to Gnatt Bar
Drag error to the Size button of the Gnatt Bar and also to the Color button
Now click the one of the pills in the row shelf and select Dual Axis
Right click the second Axis and select synchronize Axis