How to filter the worksheet based on the results of the calculated field in another worksheet? - filtering

Datasets used is sample super store (screenshot below)
Scenario:
We have two views.
First-View has counts of products(using the calculated field) falling in three different buckets(rows) spread across each date(columns)
-Count of products with profit b/w 1 and 50 (created using calculated field)
-Count of products with profit b/w 50 and 200 (created using calculated field)
-Count of products with profit greater than 200 (created using calculated field)
Second-View has the List of all the products along with meta data for those products.
Problem: Selecting the box in the First-view doesn't filter the Second-View properly. It is filtering Second-View only based only the Y axis(dates) of the First-View ignoring the rows from the First-View (the buckets b/w 1and 50 etc...)

Related

How to calculate frequency per groups in Tableau

I want to create a barplot showing the frequencies that each age appears on the table. (Each Id represents a person)
I was expecting to get the frequency by adding count but it doesn't work

Power BI dynamic Filters on group by

Im fairly sure what im attempting is not the ideal way to do things due to my lack of knowledge of power BI but here goes:
I have two tables in the form of:
One has the actual power against wind and the other is a reference
I created calculated columns that add a corresponding binned speed to each row (so 1-2, 2-3, 3-4 etc)
I have filters and slicers applied on the page / visual that will keep changing.
What i want is to create a pivot or a grouped table that is changed dynamically based on my filters.
The reason i want this is currently the table ive got has totals that are averaged (because individual row is averaged) but i want a sum of an average by category. If i can have this as a calculated table instead of a visual (picture below) i would likely be able to aggregate this again to get what i want
so on the above table i want to totals to be sum of individual rows. I also want to be able to use these totals to carry out other calculations (simple stuff like total divided by fixed number etc)

Side-by-side bar chart: One with the current filtered selection and one for total

I calculate the percent of total number of active customers for each SalesOwner in one of my Workbook sheets:
As you see, I have also added the SalesOwner as a filter.
The calculated field (segment_active_members) is computed using the following formula:
COUNTD(wk_customer)/ SUM({FIXED : COUNTD([wk_customer])})
What I want to do is create a side-by-side bar chart where upon filtering one of SalesOwners, I am able to compare it with the total (100%). So if I filter the above sheet by SalesOwner X which takes 5% of total. I'd like to see only two bars with one having 5% of the other one's length.
So I add another calculated filed to the above scenario where a fixed total is calculated:
SUM({FIXED : COUNTD([wk_customer])}
We will have a new column in the above picture with a fixed value of 100% for all rows.
I get what I want when my filter is on "All".
But as soon as I select a single filter (SalesOwner), my first percentage is also changed into 100% and I can never compare it to total.
How can I show the percentage against total for single segments?
This could be one of the solution:
Change the calculation of segment_active_members as follows
SUM({FIXED [Sales Owner]: COUNTD([wk_customer])})/SUM({COUNTD([wk_customer])})
Remove the table calculation for segment_active_members in the Measure Values shelf
You'll see that you are able to filter it down without any problem now
Cheers!

Adding a row subtotal for certain columns only

I have data as shown in this table:
If I add a grand total column Io get sales and units across the window.
Is there a way to add a row total for only Contract Owners AAA and BBB? But not CCC & IDN?
Arrange your data on the sheet as shown on the screenshot (using Measure Names and Measure Values), display subtotals and then use the individual measure pills to hide subtotals for selected measures.

Different Total Types in Tableau

I am trying to use Tableau's row total function but am running into a challenge. In the same widget I have Rows 1 - 4 with Numbers. Row 5 is a percentage.
What I would like to do is have Rows 1 - 4 use a Sum Total and Row 5 use an Average total.
Any suggestions on how I can do this?
Thanks,
I don't believe you can use different total metrics on the same worksheet.
What you can do is to create 2 different worsheets, and bring them side by side on a dashboard. Then use the proper Total metric in each.
But beware on calculation average of percentages, because they might be twisted. Usually weighted average is required to accurately express the "average" of a percentage.
What you can do is to actually calculate the percentage (use a calculated field) via the division of two metrics. That way, when you do Totals you will actually a valid value for the "average" of the percentage.
As an exercise, suppose you have sales (in $) in first row, and # of clients in row 2. Now I create a calculated field called ticket, that is
SUM(sales) / sum([# of clients])
That way I can add that to a third row, and for each column I'll have the right number of ticket, and if I add a Row Grand Total, I'll get the actual average ticket value (that is total sales / total # clients), because Tableau will sum all sales, sum all # clients and them perform the calculation (the division)