Getting a symmetrical Pie for Profit by Product Category Tableau - pie-chart

I am trying to get a simple visualization for Profit by Category.
I have a sales table for which i have calculated Total profit as Sales Amount - Return Amount- Total Costs
I have a table with the product Category name (around 7-8) categories.
Each Pie has to be the Product category
The size of the Pie has to be the profit
As per what I have done so far, we are applying the same logic -> Color coding the Product category and making the Sum(Total profits) which is a calculated field as the Size. We even tried making the angle as Sum(Total Profits). we are getting a pie that is symmetrical. Every pie has the same size.
Thank you in advance for your precious time.

Did you calculate the Profit ratio SUM([Profit])/SUM([Sales]) ? Set it on label and see the numbers. If your Profit ratio doesn't have much difference you will see the bubbles to be identical in size. enter image description here

Related

Birt Reports - Adding percentages to chart legend

Is it possible to add percentages to the chart legend, or is it the only way to put percentages to the chart, by adding the "Percentile Value Data"?
Thanks for your help in advance.
AFAIK the percentile value is usually something different, it only makes sense if the categories are based on intervals, e.g. given 7 billion living humans and measuring their age, the top 0.1 percentile are the 7_000_000_000 * 0.1/100 = 7_000_000 oldest living humans.
So, percentile values make sense for things you can measure, like age, income, length - in other words, numbers, or at least things which can be ordered.
You wouldn't use a pie chart then.
Percentile values don't make sense for things that cannot be measured like car labels.
Take a look at https://forums.opentext.com/forums/developer/discussion/48914/how-to-create-pie-chart-with-percentage-instead-of-values
M Williams writes there (I just repeat this here):
In the chart editor, you can go to the "format data" tab, then to the value series section, click on the "labels" button at the bottom, delete the "value data" option from the values window, then from the dropdown below the window, choose the percentage option and add it. This will show your pie chart labels in percentage.

Percent of Total for Categories Within Different Panes

I'm attempting to calculate the percent of total based off the the first column in each pane. However, table calculations only allow a calculation based off the each pane
SUM({ FIXED [Category]:SUM([Number of Records])})/TOTAL(SUM([Number of Records]))
does not produce the desired result.
It simply measures the number of records total in the category.
I cannot fixed the TOTAL function to category as it is a table calculation.
In the image, essentially I am trying to get all of the bars of the same color together without adjusting their heights.
enter image description here
I'm not really sure on what you're trying to do, when you say "percent of total based off the the first column in each pane" - does that mean total records with category 'furniture' & region 'central' shown as a percentage of all records, or total records with category 'furniture' shown as a percentage of all records with region 'central'? Or something else?
I have a feeling you can get to what you need by creating 2 fixed LOD calculations, or by fixing to 2 dimensions (e.g. { FIXED [Category],[Region]:SUM([Number of Records])}

How to make a stacked bar chart where the total measure is always fixed at 100%?

I am attempting to create a 100% stacked bar chart in Tableau where the total stacked measure is always equal to 100% on the axis in order to make a productivity dashboard. I want all filter options to look like the first picture attached below where the total stretches and stops at 100%. However, some cases break this rule, such as going over 100% or when the "All" option is selected and stretches it 700%.
I tried fixing the axis max at 100% and it works perfectly for all the individual employees but since the "All" selection goes up to 700%, it just shows it all the way full at 100%. Is there anyway to make my total measure, in this case "Goal", always set to 100% no matter what the number is? This is my current formula for my total measure of "Goal" {Fixed [Contractor], Date: SUM([Goal])} / {Fixed [Contractor], [Date]: SUM([Goal])}
Thank you for any help!
Employee 1 with normal productivity where the axis is staying at 100%.
Employee 2 going over 100% where the axis then stretches past 100%.
All employees added up where it stretches the axis to over 700%.
This is most likely a problem with the "Compute Using" attributes for the table calculation. Since table calculations are secondary calculations on top of your existing measures you have the flexibility for how they are calculated.
Here is how to adjust this. Click on your measure and select "Edit Table Calculation..."
To get the same result as you I will want the table calculation to calculate on "Table (across)" which will look at the dimension (in my picture, Category) instead of by Category AND Month. The little numbers in brackets and the yellow highlights are especially helpful in showing you how the calculations are being interpreted.
See the default "Table (down)" and the desired "Table (across)" calculations in the screenshot below. You will likely want the same but it might depend on your exact Viz setup.

How to make a 100% Stacked Chart with 2 measures in Tableau?

I am using Tableau to create a productivity progress bar of actual work done, versus the goal for that day. I have gone through numerous resources, but none seem to apply to only using 2 measures, basically putting the actual data measure turned into a percent within the goal measure. I have the chart working by using a calculated field of Missed Goal ([Goal]-[Actual]) but I am wanting into to look like a 100% stacked chart. Here is a picture of what I have, I just can't seem to get the last step expanding the bars horizontally to be a %100 chart:
Currently looks like:
Wanting it to look like:
Thank you for any help!
This is a good candidate for a few LOD Calculated Fields.
I will give an example based on the SuperStore dataset where [Profit] is a percentage of [Sales]. This can be extrapolated to your use case.
Because you have two dimensions on the view, both will be needed to be accounted for in the LOD calculations below:
//LOD Sales
{Fixed [Segment], Year([Ship Date]): SUM([Sales])} / {Fixed [Segment], Year([Ship Date]): SUM([Sales])}
We will always want [LOD Sales] to equal 1 for bar-chart display purposes.
//LOD Profit
{fixed [Segment], Year([Ship Date]): SUM([Profit])} / {Fixed [Segment], Year([Ship Date]): SUM([Sales])}
This will create the percentage of [Profit] to [Sales].
From there, you'll want to turn off Stack Marks so the bars overlap eachother:
Analysis Menu > Stack Marks > Off
And probably change the axis display to a percentage:
Right click [Measure Values] > Default Properties > Number Format > Percentage
For simplicity, your existing filters should be placed 'On Context' as to not interfere with the LODs. (Please read above linked article for reasoning and alternatives.)
Right click on Filtered Field > Add to Context
The end result should look like this:

How to change the color of each field in text-shelf of tableau and add legends for the colors -Tableau

I am in the process of converting few of my ssrs reports into tableau. I created a tabular model worksheet which shows Comparison of budget & actual amount in region, district , year wise. I have added region, district in row shelf and budget & actual amounts in text shelf.
Now I need to show Budget & actual amounts in different color. Also I need to add a legend for each text colors. Please help how to do this tableau.
Thanks for the help
You need to place the Measure Values measure in the Text card instead. This will allow you to use the Measure Names dimension in the Color card.
For example:
You will need to filter on Measure Names to make sure you only include those two measures.
Also, I added Measure Names to the Rows section, but unchecked Show Header so that the numbers are vertically stacked.