How to create a dynamic column (bar) graph in calc/excel - charts

I have a table with 6 columns and need make a graphic dynamic equal this other picture. Basically horizontally I would like to have the months and vertically the total. And in the filters you could choose between the other columns. Just that, but it's been impossible for me
I really don't know what else to do to be able to develop a dynamic graph like the one I made on paper ... I have the file, with the table, but I can't develop the graph at all. Can someone give me a tip on how to make it the same?

Generally, you can create a dynamic chart in LO Calc using a Pivot Table. I'll show below how to do this for a data table with a structure like yours. Please notice that I'm not 100% sure about the resulting chart's layout. I assume it should display bars for the %COM and the %VAL values for each month (defined by COMPET) for a given UNI.
I'm using the following simplified data source containing arbitrary values, but with the same structure as yours:
1. Create a filtering pivot table:
Select your entire source table;
Menu Data -> Pivot Table -> Insert or Edit...
In the "Select Source" Window: "Current Selection" -> OK
Define the pivot table layout by dragging the fields from "Available Fields" to the appropriate layout fields:
a. "UNI" to "Filters";
b. "COMPET" to "Row Fields";
c. "%COM" and "%VAL" to "Data Fields";
d. Open "Options" and select "Add Filter"
e. Under "Source and Destination", set the desired destination (new blank sheet or anything else).
The dialogue shot now look like this (arrows added to illustrate the steps above):
The resulting pivot chart should look like this (don't worry about the values. Since there's currently no filter applied yet, the pivot chart simply sums the values from every "UNI" for each month):
2. Insert a column chart based on pivot table
Now, simply create a simple columns chart with bars from the pivot table: Select the data area including headers (in my example: A5:C9) and create the chart without any modifications. The resulting chart is shown below.
Notice the filter Combobox in the upper left corner, currently labeled "UNI | - all -" (the filter column and the current filter value). LO Calc inserted it automatically since the Pivot Chart contains a filter on the UNI column. The filter ComboBox works the same way as the AutoFilter. Again, don't worry about the values shown since there's still no filter applied (thus, it shows "- all -" instead of the filtered UNI value):
Now, you can use the filter ComboBox for the UNI value in the chart to restrict the chart to a certain UNI value. Notice that the ComboBox values changes from "UNI | - all -" to "UNI | B", since there's an active filter on "B" values from the UNI column:
3. Add a secondary Y axis
Since the two values (COM and VAL) are quite different, a secondary axis may be useful. To add one, do the following:
Make sure you're still in chart editing mode (check if there's a thick gray border around the chart. If it isn't, double-click into the chart area to enter editing mode; alternatively, right-cluíck into the chart and select "Edit" from the context menu).
Right-click inside the chart area and select "Insert/delete axes";
Under "Secondary axed", tick "Y axis"; click OK. A secondary axis should appear.
Right-click into one of the value bars, select "Format data series";
Under "Options", "Align data series to", select "secondary Y axis"; under "Settings", select "Show bars side by side"; click OK.
Voilá:
That's all - now you have a sheet with a dynamic chart based on the selected UNI value(s).

Related

How to create a pie chart for yes and no answers in Spotfire and not display the Percentage of Yes/No?

I am trying to create a Pie chart as markers in Spotfire map to Show Yes/No answers. How do I do to Display yes and No in pie Sector's instead of Percentage? I am attaching an Excel Spreadsheet with Data with this.
I am expecting to get individual Pie chart for each well in the Spotfire map. For example for WELL_1 Data, the pie chart should have two sectors of two different colors one for YES and one for NO and Sector 1 Should show PRODUCTION, COMPLETION Labels(for yes Category) inside the sector and the Other sector Should show PVT, Image Lables (for no category).
I have tried using the Pie marker option in Spotfire Settings, but not getting the result I am expecting. Any help would be appreciated.
enter image description here.
enter image description here
while Spotfire excels at reading data up and down columns, it's not really designed to read left to right across rows.
you will need to unpivot your table to be tall-and-skinny instead of short-and-wide.
I recommend to start by adding a linked copy of your data table. this way your original table isn't changed, so any visualizations you've already built won't break.
since you haven't specified your Spotfire version, I'll assume you're using 10.x, and my screenshots will reflect that. I'll also be calling your original table Data Table, because I'm lazy and didn't change it in my screenshots ;)
click the + icon in the top left corner
click Other
under "Linked copy to data table in analysis", choose your Data Table
rename the new table to Data Table unpivot to distinguish it, then click OK
from the Data menu, click Transform data...
select Unpivot from the dropdown, then click Insert
configure the transformation
click OK until you get back to the canvas
from the Data menu, click Add calculated column
enter an expression like the following
CASE
WHEN [Category] in ("PRODUCTION", "COMPLETION") THEN "Sector 1"
WHEN [Category] in ("PVT", "IMAGE") THEN "Other"
END
call this column something like Sector
now that you've got the data configured, you can set up the pie chart as needed. here's a sample of that which I put together quickly. I set up the pies on a trellis to illustrate how it might look in your map.

How to filter top customers within certain section in Tableau

I have a Tableau file whose source is from one Excel sheet as shown below:
And it's how it looks in Tableau:
I have a Tableau sheet to show me the top 3 customers in each section. For example, company F, H, J, B, A are in section XXX, I filter section XXX only, sort F, H, J, B, A, select the top 3 customers and hit "keep only". So I have a table of top 3 customers in XXX section. Please see the pics below:
My question is, every month I have an updated Excel sheet with same format and I feed it into Tableau, the sales change every month but I always want top 3 customers in each section. For example, top 3 customers this month in XXX section are F, H, J but next month it might be A,B,H. However since I use "keep only" to filter F, H, J, the top 3 customers can only be F, H, J unless I manually change the filter. Is there anyway I can program Tableau to pick up the top 3 automatically whenever I feed new data to this file? I know "filter top n by" can do it but it can only filter by one variable, like they can only filter by sales instead of sales AND sections. I want to use "by formula" in the pic below to do it but I am not sure how to write the formula.
Have you tried to use the "Top" instead of "Condition" tab? You could also try to use a rank.
Create a calculated field "Rank", put index() into it, make it discrete and put it between your segment and customer pillow. Untick "Show header" and use it as a filter on the filter shelf.
I would use the Quick Table Calculation Rank. To do this create a new worksheet as follows:
Drag Section onto Rows
Drag Customer onto Rows
Drag Sales onto text mark
Drag sales onto detail
Right click the sales that you have dragged onto detail. Select Quick table calc and then rank.
Change this table calc from the detail mark onto the rank mark.
Now you can see what it is doing my default. You can see that is will be calculating the rank across all sections. As you mentioned you want the rank per section you just need to adjust the way the quick table calc is working. To do this right click on the measure and select edit table calc. Under Compute using you can change the way the calc is working. Select a couple of different ones to see what is happening. As you have structured the workbook to have Section and then Customer on the Rows shelf you should be able to use pane across then down. This means that it will calculate the rank per pane which in this case is per Section and will calculate down across Customer.
8) You can now drag this measure onto the filters pane and select a range of 1-3 this will filter the view to only show the top 3.
This method will work dynamically even when the data is updated :)

Create Actions From Tableau Map (with points)

I am familiar with how to create actions in Tableau, but doing so with map points has stumped me. It seems as though Tableau uses the lat/long measures uniquely and different than how it would another measure.
The expected behavior I want is a user to be able to select a single map point from a Tableau sheet so I can use that selection to drive an action (in this case adding the selection to a separate, blank sheet).
Here is one workaround, but this isn't a stable solution for the end-user:
1) Find desired map point -> right-click -> keep only
2) From the new 'Inclusion' pill that appears under 'Filters'...right-click -> apply to worksheets -> selected worksheets -> choose sheet
Thanks, Vamsi. I solved this morning a bit differently, it was actually really easy and didn't require any calculations:
Used carrot on my map's toolbar to 'Use as filter.'
Added a hidden crosstab to the same dashboard that, of course, changed to show the chosen map point.
Used that sheet to power my other calculation.
Essentially, I had to have both sheets on the same dashboard which allowed 'Use as filter' to solve my challenge.
(A) As each map point (generated lat/long value) is linked to a specific set of Geographic dimensions, you can create an index/combination of these fields as a calculated field.
For example, if the fields "City", "State" are the geographic dimensions, create a calculated field
Index = [City] + ", " + [State]
After you create an Action filter from the map to the desired blank sheet, at the bottom of the "Add filter Action" window use "Selected fields" under Target filters and click Add filter. In the pop-up, select the recently created Index field for filtering.
(B) You can also just add the City and State fields separately into the "Selected fields" in the Action filter and not have to create the Index altogether.
In both ways, even if there are multiple rows of data for the same location on the map, the result would show all those rows.

average of calculated rank in tableau

I would like to calculate the average of calculated rank for each competitor variable. I have trouble finding a solution as calculated rank is aggregated value. Can anyone help me with this?
It is the 2015_06 packaged file, and see "sheet 7".
https://drive.google.com/open?id=0B1PGq-fzDlKcWi03emxrQm1wdWs
I had a look at your workbook.
You need to do a change to your calculated field but then you can do it fairly easily with the table calculations.
Change the field Prem Rank to Rank(sum([Premium]),'asc')
Right click on it in the Marks section and make sure that "Compute Using" is set to "Table (Down)"
Create a calculated field with WINDOW_AVG([Prem Rank]) (I called it WINDOW_AVG([Prem Rank])).
Drop it into the column shelf
Right click on AVG(rank) -> Edit Table Calculation -> choose "Compute using: Advanced"
Change the settings according to this picture:
Right click on AVG(rank) again and choose "Discrete"
The result will be a table like this:
I think that is what you are after?

How to color code cells of a column based on the text value in Tableau

I'm a new tableau developer trying to develop a table based tableau report. I have a column in the table called "Status" which essentially contains 3 values "In progress" , "Blocked" and "Completed". I want to color code the cells of this column based on these text values. I was unable to get this from the tableau community and hence posting it here. Anyone faced this problem? Kindly let me know how you solved it.
Raghu
First thing, Tableau is not excel. Stop trying to make Tableau work like excel, you'll miss most of the power Tableau brings, and make it inefficiently operate like Excel.
That being said, let me give you an alternative. Instead of text chart (which is what you're using to get a table), select Shape chart. This will add balls in the last column (but you can choose what shape you want)
Now drag the Status to color, and voilà, the balls are painted accordingly to Status. You can customize the shapes too (just drag some field to Shape), and selected what shape and color you want to each value.
This will look more like a "control panel", with the color of the balls something like a traffic light. You can even import some pictures of traffic lights and use them as shapes, that could be cool (if properly used)
I know this post is a couple years old, but there is a way to do this. In a new tableau workbook, import the data from Excel (just one column with the status values). Rename the table to "Status Colors" with a dimension field called "Status". Click the dimension field "Status" and select Default Properties > Colors. Assign the colors to each data item (value). For custom colors (RGB, HTML, etc.) double-click the color next to the value and assign the desired color. Click OK, then publish the data source to the server with the options checked to "Include external files".
You now have a Tableau data source that can be added as data to any other workbooks that when linked, the [Status Colors].[Status] can be used as the color key for the field on any graphs. The default colors are stored in the data source. If you update the color workbook, then it will update any other workbooks that use this data source.
Since SO community has thrown it in active threads, let me propose an answer. Though, I completely agree that we shouldn't replicate features of excel in Tableau, yet here is one workaround.
I took a dummy data like this
create a calculated field say status cf with the following calculation
CASE [Status]
WHEN 'In Progress' THEN 'Yellow'
WHEN 'Completed' then 'Green'
WHEN 'Blocked' then 'Red'
END
create two more CFs say 1 and 0 with just 1 and 0 in these as calculations.
Drag dummy and status to rows shelf. sum(0) and sum(1) to columns shelf.
Drag status cf to sum(0). Edit sum(0) in marks card with type as shape (square), and increase its size. edit colors as fixed in calculation.
Drag status to label in sum(1) in marks card. change type to text
Convert both measures in columns shelf as dual axis.
After a little formatting, you'll get a text table like this
You may optionally hide, status col in rows shelf