Tableau Histogram based on Aggregated data - histogram

I have a data set that looks like it aggregated into a pivot chart and then copied as values so I can't expand it.
My problem is I'm trying to create a histogram to look at the frequency of the age groups to see which age group had the most. Is there a way to do this in Tableau?
This is my data set I'm working with:
And this is essentially what I'm trying to create, but the bins would be the various age groups:
What I'm worried is I'll need to expand all of the data and have 1 cell for each group something like this:

Related

{FIXED} calculated field ignoring filter

I'd like to create 2 calculated fields which are summarizing data. I want them to ignore date filter. I tried like 20 different things and accomplished nothing.
My goal
Tableau workbook

How to generate a distribution based bar chart on row_numbers

I have a SQL query that acts as a data source in my tableau desktop:
SELECT
row_number() over (order by sales) as rn,
article_number,
country,
SUM(sold_items) as si,
SUM(sales) as sales
FROM data.sales
WHERE sales.order_date between '2021-01-01' and '2021-12-31'
GROUP BY 2, 3
On tableau I dragged rn to column and sales to row to generate a bar chart. The following is the output:
I want to convert this into a 0-100% distribution chart so that I can get the following result:
How can I achieve this? Also, I want the user to filter by country level so even if the # of records increase or decrease, the distribution should always be consistent with the filtered data.
You can do this with nested table calcs.
For example, the following uses the Superstore sample data set, and then first computes a running total of SUM(Sales) per day, then converts that to a percent of total. Notice the edit table calc dialog box - applying two back to back calculations in this case.
The x-axis in this example is Order-Date, and in your question, the the x-axis is a percentage somehow - so its not exactly what you requested but still shows that table calcs are an easy way to do these types of operations.
Also, realize you can just connect to the sales table directly, the custom sql isn’t adding any value, and in fact can defeat query optimizations that Tableau normally makes.
The tableau help docs explains table calculations. Pay attention to the discussion on partitioning and addressing.

Data validation drop down list from a range, than only displays values conditionally WITHOUT using a second calculation sheet

I have a function in a data validation drop down list that shows options from a range A2:A30, but I only want it to show options that have a value greater than or equal to 10 in the column over B2:B30. The cell I am referring to is O5.
Example sheet
The purpose/objective is that I have a linear regression formula building projections based on past data about the selected mode, and I don't want the dropdown to be able to select options that have a count less than 10 (because the projection is wildly inaccurate). I would like to do this without creating a second tab or hidden section that populates a second range under those conditions, and then rerouting the data validation to that range.
Any suggestions towards this goal or towards learning about the general idea will be appreciated.
I have come to an indirect solution by manipulating the data in a different way specific to my example sheet. I changed the data validation drop-down range from A2:A30 to A2:A5, and then changed the =unique() formula to a query that fill in the options, the count for that option, and then sorts it ascending so that the top spots are the ones with the most data. Therefore the linear regression will be somewhat limited to the options with better data.
The query is:
=query('Data Sheet'!$A$2:$C, "select A, count(A) where A is not null group by A order by count(A) desc label count(A) ''")
All of the rest of the formulas are built off of that query, including the data validation drop down. It is in my example sheet.

Google Sheets sum multiple columns

I’ve just inherited a google sheet from a client where they’ve put multiple campaign performance data tables next to each other in a single sheet. I need to sum up the metrics into another sheet. The problem is that there are around 107 campaigns currently active and if I start summing them up the regular way with something like =sum(A2,D2,G2,etc) it’ll take me a long time to get it done AND there would be no guarantee of accuracy.
I’ve made some sample data which looks like my client data. Link to sample data: https://docs.google.com/spreadsheets/d/1DtcYbkdHgcOH-IzEaD4UsWT2upujx8qD4AC8LErlM-U/edit?usp=sharing
In the data tab, I have a sample of the campaign data. You can see that there are multiple sections where each section represents a campaign. In the consolidated sheet, I’ve shown the end result that I need to work towards - a daily summary of all campaign data.
I need a solution which will scale up to 107 campaigns whose data is recorded in this one single sheet in a similar format. I appreciate any help that I can get with this project!
You can use the Query formula to get the desired output:
=QUERY(ARRAYFORMULA({Data!B4:F6;Data!H4:L6;Data!N4:R6}), "SELECT Col1, Sum(Col2), Sum(Col3), Sum(Col4) GROUP BY Col1 ")
I have only added 3 tables as example, you can add more as required

Alteryx: Creating multiple Histograms from one dataset

I have a data set that contains the following information - Date, item # and the unit price for that item on that date.What I would like to create is one histogram per item (my dataset has 17 unique items), charting the frequency of the unit prices? Is this possible in Alteryx?
What you really want is the ability to group by items within your data set. I think the closest thing to this for your specific use case is the summarize tool. You can group by item and then use the percentile operation to generate several points within the data range to add to a histogram.

Resources