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

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.

Related

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

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).

dynamic column in tableau based on quick filter selection

I would like to know if it is possible to create a dynamic column in Tableau that will change based on quick filter selection.
Example:
Tableau sample screenshot
Try using parameters to select the category. This will give you step by step directions.
Doing this is as simple as it looks.
Assuming that you're using a query to fetch data, make sure the column on which you want to apply filter is available in the select statement.
Next, go to Sheets and drag the field into Filters section, right click on it and select Show filter
The filter will be visible on the right pane and can be used to alter the data depending upon the values / ranges selected.
Also, filters on Tableau give you a host of options to select from - dropdowns, radio buttons, check boxes, sliders etc etc...

Tableau add formula to dashboard action filter?

I've got a workbook I'm building using public data https://public.tableau.com/profile/alee4645#!/vizhome/JSAClaimantsWardtimeseries/Dashboard1
The basics are working as I want, you see the map, you click on one of the coloured areas and a time series chart appears below the map showing the change over time for that area.
I want to add a couple of comparisons to this data, for example I want the time series chart to show a line for the whole coloured area (Somerset) so people can see how one part of it compares to the overall average.
I have the figures as separate rows in the data but of course when the action filter is triggered they get filtered out along with everything else.
If I edit the action filter in the filter shelf for sheet 2, it has the condition tab and I was hoping I could add [ward code] = "E10000027" (the comparison data I want to use) to the formula box so it would also keep the relevant rows of data, but that stops the chart working altogether.
I could achieve it by getting people to choose an area from a parameter drop down but I'd rather let them click on the map so they don't need to know the name of the area they are interested in.
Can this be done?

How can I add an Average column to this text table?

I'm building my first dashboard in Tableau and I'm just beginning to learn all the nuances. Right now, I have a basic text table as shown in the image below. I'm trying to add an "Average" column at then end which will give the average per "Assignee" across the 5 fiscal week's shown. I assume there must be a pretty simple way to do this, but I've searched all over and cannot figure it out. I've been able to change the "Grand Total" column to show averages, but not add an additional column so I can display both data points. Can anyone provide some insight into how to make this work?
There are two things you can do:
Go To "Analysis/ Total/ Show Row Grand Totals" and the go to "Analysis/ Total/ Total All Using/ Average" This will give you the row and column averages. Your questions sounds like you want row average but column total, so you should try the second option.
Create a calculated field with WINDOW_AVG(sum([YourMeasure])) (Replace [YourMeasure] with the meassure you want to average. I couldn't see the full name in the screenshot) I will call it AverageMeasure
Then drag the AverageMeasure pill into the rows shelf, right click it and choose "Discrete".
It should look something like this now (I used the Tableau default data set):
If you want to format the number properly, right click on the AverageMeasure in the measures section, choose Default Properties/ Number Format and choose whatever you prefer.

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