Chart showing amount of numbers in dataset in Google Sheets - charts

I have a set of 500 numbers (range A1:T25) from 1-200 that I need to put in a pie chart showing the popularity of each number from 1-200. When I try to select all of the cells and put them in a pie chart, I can see multiple slices for each number. I even tried putting the cells into a single column.

=QUERY(QUERY(ARRAYFORMULA(TRANSPOSE(SPLIT(JOIN(" ",
QUERY(A1:T25, , 10000)), " "))),
"select Col1,count(Col1) group by Col1 label count(Col1)''"),
"order by Col2 desc")

I hope your data is not uniformly distributed—pie charts with 200 slices can be hideous!
If I'm understanding your goal correctly, you don't actually want a chart of those 500 numbers, you want a chart of how often each value appears in that set. Generate a report of that data in pairs, and chart that.
For example in a cell with 200 empty cells below it, say A30 or V1, enter:
=ARRAYFORMULA(ROW(1:200))
These are your possible values, 1 to 200.
Then next to it in say, B30 or W1, enter:
=ARRAYFORMULA(COUNTIF($A$1:$T$25, "="&ROW(1:200)))
These are individual counts of how often each A column number appears in A1:T25.
Now that your values and their 'popularity' counted out, create your pie chart from that.

Related

Tableau layout for multiple charts on one worksheet

I have 15 pie charts on one worksheet (one for each year since 2006). At the minute I can either have them in a vertical line or a horizontal line but I want to have them in 3 rows of 5, how do I go about doing that?
Thanks in advance (from a Tableau newbie) !
What you're looking for could be a tecnqique that consists in creating two additional calculated field for row_indicator and column_indicator.
So assuming you have a pie for each product_category you could create something like this for rows:
if prdocuct_category in ('a','b','c','d','e') then 1
elseif prdocuct_category in ('f','g','h','i','j') then 2
else 3
end
Once you've done the same for columns, you can use those two fields in the worksheet as first field in row/column shelf.
Otherwise, you can check the small multiple technique which is more or less the same and splits your by in groups according to the square root.
Check this tecnique in this video:
https://www.vizwiz.com/2016/03/tableau-tip-tuesday-how-to-create-small.html

Sort Tableau bar char by year percentage difference top 5

I have a bar chart sorted by year over year percentage difference and I have excluded values that are too large (over 400% year over year difference) . I want to show the top 5 for each category using a parameter variable("TopN"). The bar chart shows less than the allocated parameter amount (5) for some of the categories selected even though there are values there. I used the following code below.
if [index]<=[TopN] THEN "Top N"
ELSE
IF [index]>=SIZE()-[TopN]
THEN "Bottom N"
ELSE
"Middle"
end
END
When I remove the filter to remove the too large values I mentioned above I am able to see the correct number but I don’t want those values to be shown and want to see the top without the large values(outliers).
I used sets to exclude the values that were too large. And that worked for me. It removed the large values and when I applied the top N filter. It now it gives me what I was looking for.

Tableau: Plot percentage of binary column

Simplified example: column of 'measure' data is binary 0's and 1's. The sum of the column (all the 1's summed) is 3948. The length of the column is 4567. 3948 is 86% of 4567. How do I create a bar chart showing this percentage. All I can get is a bar adding up to 100%.
I've tried absolutely everything in the percentage of dropdown, calculated fields, online tutorials, etc.
Two approaches:
Right click on your measure field on whichever shelf you placed it. Choose Quick Table Calc -> Percentage of Total. Experiment with different settings for "Compute Using" and read about addressing and partitioning of table calculations to learn how to specify percent of "what".
Or create a calculated field specific to your problem defined as below:
sum(int([my measure field] = 1)) / count(1)
Be sure to set the default number format for your calculated field to a percentage, by right clicking on it in the data pane (left margin) and revising the default properties
Note, the second calculation works because the INT() function converts True to 1 and False to 0, which is useful in several contexts.
You can go about this using the following method
Add 'measure' to Columns and make it a Discrete Dimension
Add SUM(Number of Records) to Rows. This should give you the bar chart you need.
This would help achieve what you are looking to do. For more customization and a better look for the graph you are looking to build in Tableau.
Add 'measure' to the colour legend and make it a Discrete Dimension.
Add SUM(Number of Records) as a Label and do a '% of Total' quick table calculation.

Compare big gapped data columns in chart

I have these related columns:
col1 data range 1500 - 3000
col2 data range 27 - 50
col3 data range 0 - 30
I want to show the relation between those columns in a chart. But as col1 is so far apart from the other I just see the line of col1 and the other two are barely more than a straight line at the bottom of the chart.
How can I drag them up so the values are correct but I can still see the correlation between all columns?
What I would actually need are three charts that overlay each other.
I did not find any option for this in LibreOffice Calc 3.5.4.2
There are different ways to handle differently-scaled data when creating a chart. The easiest way is to "scale" the raw data; e.g., to divide every value in col1 by 1000 and use the result as source data for the chart.
If modifying the source data is no option, you could use different scales for col1 on the one hand, col2/3 on the other. Starting with the following dummy data:
If you've selected the data series for column C, you could align the chart columns to the secondary Y axis, while columns A/B keep aligned to the primary Y axis.
LO will adapt the scale of the secondary Y axis automatically by default:
Another option would be combining a default primary Y axis with a logarithmic-scaled secondary X axis...
... resulting in:
But generally, i would refrain from combining a "normal" primary X axis with a logarithmic secondary Y scale, since such a chart will be very hard to interpret.
In any case, i would recommend to enable data labels to display the values together with the columns.
PS: All charts created with LO 4.2.3.3

a percentage values in crystal report

I have values in database witch is a percentage values for example:
Per columns : 90,85,38,70,85
I select “Per” as the value to be shown in the bar chart
But when I run my crystal report all my bar display as 100%
It does not take the exact value of “Per”
How can I solve this problem?
If your column values are whole numbers then you should probably create a formula to calculate the fraction. Then you should be able to display as a percentage. Eg. {table.fieldname} * .01